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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Tue Apr 23 10:01:29 2024 UTC