I'm also using drupal-7 and create a module. A form in which there are 2 drop downs. On selection of car model (1st drop down) car variant (2nd drop down) value will change. It work perfectly when I am creating new one. But once I go to edit some value it shows me error.
===========================================================================
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /vehicle_ades/?q=system/ajax
StatusText: Service unavailable (with message)
ResponseText: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'ajax' in 'where clause':
SELECT heading,details,value_of_offer,exchange_offer,total_savings,car_model_id,car_variant_id FROM {va_offer} where id = ajax; Array ( )
===========================================================================
How do I pass car model id to ajax function