note 77867 deleted from function.mysql-query by sp

From: Date: Sat, 24 May 2008 20:57:03 +0000
Subject: note 77867 deleted from function.mysql-query by sp
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-139711@lists.php.net to get a copy of this message
Note Submitter: Jacky ---- This is a replay to: a at a dot com 20-Jun-2007 04:59 I call it a bug that PHP can not execute multiple queries, if your code is vulnerable to your example, then your code is broken. The language has no business hiding your bad code! That would be like blaming items when something bad happens ..... never mind, this is common practice now a days.... Not supporting multiple queries in one execution is a problem when you want to run thousands/millions of queries over a slower network connection. I'm here because I need to execute ~ 6000000 MySQL queries to populate a random customer database. Running saved queries every few thousand statements would save a lot of time.... Not supporting this is like that magic_quotes problem which causes more problems then it solves, at least magic_quotes will finally be removed from PHP6. [quote=a at a dot com] ###The reason that multiple queries are not supported is to help prevent exploits.### For example, the user could enter something like: "; DELETE * FROM users; in the name field of a form, which would erase everything in the table when the query is executed. By allowing mysql_query to support only single commands, this hole is closed.[/quote]

« previous php.notes (#139711) next »