Hi,
again a problem that was discussed many times in the forum but I can’t make it work.
I have a table users and a table reports. In a form (where I fill out the report) I’d like to show some basic data in the report which is in the users table e.g. name, address of the report writer. I made a selection field and lookup to select the name of the report writer. After selecting the name I’d like to auto fill the basic data concerning to the name from the users table.
I made an ajax event onchange that belongs to the name selection field in the form and put in something like this
sc_lookup(rs, "SELECT user_city FROM user WHERE id = {user_city}");
{user_city} = {rs[0][0]};
In the form field i put the initial value {user_city}
When generating the form I get the “error mysql_fetch_array() expects parameter 1 to be resource, boolean given” and no auto fill works.
Any help is appreciated.
BTW: Can someone explain the “Fields to be passed as parameters” when do I need this?
Joe