A
Anonymous
Guest
Hi All,
I would like to know if it is possible to test a query, hence without actually doing whatever it is I'm trying to do. For example:
I have a dynamically generated INSERT SQL-query, which should return a mysql_insert_id() after execution.
With this last id, a number of subentries are made. For these subentries, the id is absolutely necessary.
How can I test if the first query would return TRUE (for example) and hence could continue creating/updating the subrecords, without putting the whole thing in one big if..then..else-statement?
The last option seems especially difficult and complicated if not one, but several sublevels are used.
I have tried the MySQL/PHP manuals and Google, but actually I have no clue how to formulate what I am looking for..
Any help or reading materials would be appreciated.
Thanks,
Cas
I would like to know if it is possible to test a query, hence without actually doing whatever it is I'm trying to do. For example:
I have a dynamically generated INSERT SQL-query, which should return a mysql_insert_id() after execution.
With this last id, a number of subentries are made. For these subentries, the id is absolutely necessary.
How can I test if the first query would return TRUE (for example) and hence could continue creating/updating the subrecords, without putting the whole thing in one big if..then..else-statement?
The last option seems especially difficult and complicated if not one, but several sublevels are used.
I have tried the MySQL/PHP manuals and Google, but actually I have no clue how to formulate what I am looking for..
Any help or reading materials would be appreciated.
Thanks,
Cas