Results 1 to 5 of 5

Thread: MySQL queries.

  1. #1

    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

  2. #2
    Join Date
    Jul 2003
    Location
    Kuwait
    Posts
    5,104
    multiple queries are separated by ;

    Hope that helps.

  3. #3
    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.

  4. #4
    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.

  5. #5
    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?
    Quality web hosting PullHost.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •