Multiple SQL Queries in Single PHP Script ?

A

Anonymous

Guest
I need to use the result of the 1st SQL query as input to the WHERE filter of 2nd query.

What I have so far is ugly:
[ul]
[l] ithe first Java method getStudDate() executes the first PHP script and return the result in JSON format e.g. to be stored as Java date;[/li]
[li] the second Java method getStudClass() pass the java date in the .execute(stud_id, stud_class, attendance_date) to a second PHP script which uses it on the WHERE filter.[/li]
[/ul]

I have been reading up on mysqli_multi_query($con,$sql) , but it doesn't seem to allow me to use the returned value of the first SQL to use as the WHERE filter in the second SQL. It seems to execute only unrelated SQL queries...

Can someone point me to some related useful links and examples please?

Thank-you.
 
Back
Top