Multiple SQL Queries in Single PHP Script ?

Links for php scripts

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 3
Joined: Sun Jul 02, 2017 12:01 am

Fri Aug 25, 2017 12:32 am

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:
[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]

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?


Post Reply