Results 1 to 5 of 5
Thread: MySQL queries.
-
04-21-2004, 11:05 PM #1Web Hosting Master
- Join Date
- Nov 2002
- Posts
- 727
MySQL queries.
I am making a PHPMyAdmin type script. How do I get PHP to recognize multipe MySQL queries in one chunk?
Quality web hosting PullHost.com
-
04-22-2004, 04:39 AM #2Web Hosting Master
- Join Date
- Jul 2003
- Location
- Kuwait
- Posts
- 5,104
multiple queries are separated by ;
Hope that helps.
-
04-22-2004, 11:54 AM #3WHT Addict
- Join Date
- Oct 2003
- Posts
- 124
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.
-
04-22-2004, 11:55 AM #4WHT Addict
- Join Date
- Oct 2003
- Posts
- 124
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.
-
04-23-2004, 07:13 PM #5Web Hosting Master
- Join Date
- Nov 2002
- Posts
- 727
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.Quality web hosting PullHost.com