php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #18094 Multiple MySQL Statements per Query
Submitted: 2002-07-01 14:23 UTC Modified: 2002-07-01 14:52 UTC
Votes:5
Avg. Score:4.6 ± 0.5
Reproduced:5 of 5 (100.0%)
Same Version:1 (20.0%)
Same OS:2 (40.0%)
From: hz11 at nyu dot edu Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 4.2.1 OS: All
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: hz11 at nyu dot edu
New email:
PHP Version: OS:

 

 [2002-07-01 14:23 UTC] hz11 at nyu dot edu
I think a valuable addition to the MySQL functionality would be a way to run multiple statements per mysql_query() call. For instance:

mysql_query('CREATE DATABASE mynewdb; CREATE TABLE newtable(id TINYINT NOT NULL);', $mysql_link);

Currently,  I would get a SQL syntax error at the first semicolon.  How would results be handled, from SELECTs, INSERTs, etc?  Maybe an array of results/IDs could be returned, or a result/ID set that is itself an array.

Thank you,

Hans

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-01 14:52 UTC] cynic@php.net
this is not going to happen. the mysql extension in php is just a thin wrapper above the mysql C lib, and that doesn't allow this.

but what is far more important, this is a security measure you get for free.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 09:01:29 2024 UTC