Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004
    Posts
    144

    Unanswered: pass 2 query to mysql_query()

    why i cant pass 2 query separated by a ";" to a mysql_query() function?

    Code:
    $sql_query = "UPDATE table1 SET serial_num='AB101' WHERE id=101;UPDATE table1 SET serial_num='AB102' WHERE id=102;";
    $db_result = mysql_query($sql_query);
    in phpMyAdmin i paste this kind of queris & it works, how phpMyAdmin handle such a query? separate & run them separately or ...?

  2. #2
    Join Date
    Mar 2007
    Location
    636f6d7075746572
    Posts
    770
    I expect that phpMyAdmin seperates them out into two seperate queries. Consult the phpMyAdmin documentation to verify this.

Posting Permissions

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