[thelist] PHP & mySQL select error - whitespace issue?

Burhan Khalid thelist at meidomus.com
Sat Jun 12 02:40:22 CDT 2004


Tom Dell'Aringa wrote:

> --- Anthony Baratta <anthony at baratta.com> wrote:
> 
>>I don't normally daisy chain SQL Statements. I would recommend
>>breaking 
>>them up into distinct statements and running each seperately.
> 
> 
> Funny you mention that, when I broke it up into just one it seems to
> work. I can't understand why you can daisy them within mySQL but not
> in php? Seems rather odd. Makes more work for me...oh well.
> 
> ANyone know how to successfully daisy chain them?

The problem here is that mysql_query() will not execute queries that end 
in a semicolon (I believe for security reasons).

<quote ref="http://www.php.net/mysql_query">
Note:  The query string should not end with a semicolon.
</quote>

So, your only choice is to execute separate statements.


More information about the thelist mailing list