FYI, before you get too wrapped up in that idea, you should be aware that mysql_query() will only allow a single query at a time.Daedalus- wrote:I thought hard about whether there would be multiple queries at one time. I believe that everything I need to do can be accomplished using JOINs. I had already been thinking about how to fix the function if I did need to make more than one and I figure that I could say something like:
"SELECT * FROM users WHERE name = '$s'; SELECT * FROM images WHERE id = '%d'"
Strange problem while trying to call method.
Moderator: General Moderators
- daedalus__
- DevNet Resident
- Posts: 1925
- Joined: Thu Feb 09, 2006 4:52 pm
No no, what I would do is take
You likee?
One thing I forgot to mention. The error that I was having, when I started this thread is still appearing!! Sort of.
The page still dies at the same place, but no error message is displayed.
I can post the code if anyone would like, or I can explain what is happening.
Code: Select all
$sql = "SELECT * FROM blah WHERE doody = gross; UPDATE blah SET doody = brown; SELECT * FROM blah WHERE doody = brown";
$sql = explode("; ", $sql);
echo $sql[0]; // SELECT * FROM blah WHERE doody = gross
echo $sql[1]; // UPDATE blah SET doody = brown
echo $sql[2]; // SELECT * FROM blah WHERE doody = brownOne thing I forgot to mention. The error that I was having, when I started this thread is still appearing!! Sort of.
The page still dies at the same place, but no error message is displayed.
I can post the code if anyone would like, or I can explain what is happening.