Research Names
04-21-2004, 11:05 PM
I am making a PHPMyAdmin type script. How do I get PHP to recognize multipe MySQL queries in one chunk?
![]() | View Full Version : MySQL queries. Research Names 04-21-2004, 11:05 PM I am making a PHPMyAdmin type script. How do I get PHP to recognize multipe MySQL queries in one chunk? Burhan 04-22-2004, 04:39 AM multiple queries are separated by ; Hope that helps. slack 04-22-2004, 11:54 AM I believe that as of PHP 4 you cannot pass mulitple queries to mysql_query via semi-colon delimitation...everything after the semi-colon will be ignored. It's a security measure to prevent injection attacks. You will probably have to parse the input manually and execute individual queries in a loop. slack 04-22-2004, 11:55 AM You could also bypass PHP's mysql functions and talk directly to mysql via shell_execute (etc). This should allow you to seperate queries with semicolons. Dangerous though. Research Names 04-23-2004, 07:13 PM Originally posted by slack You could also bypass PHP's mysql functions and talk directly to mysql via shell_execute (etc). This should allow you to seperate queries with semicolons. Dangerous though. Would you provide an example? |