I have tried the following code and have no problems with it working. I have also used it in other scripts, which are in production and have been for some time. This is proof that it works.
$sql = "insert into people(first,last) values('michael', 'holm');insert into people(first,last) values('Mr', 'jones');insert into people(first,last) values('sam', 'smith');";
$result = mysql_query($sql);
Here's what I'd like to do:
1. create temp_ table
2. execute some select statements which populate the temp_table
3.select * from temp_table as the result set, which gets returned to php.
I have reviewed the MySQL documentation, all of which states this this will work.
PHP doesn't really care about the SQL statement. It doesn't perform validation or any other action on the query. It only passes it as a string and waits for a result set to be returned by the db.
I get no error msg and no result set from my query. I only get back, in phpMyAdmin, a statement to indicate that my SQL statement exectuted with no errors.
Any help would be greatly appreciated. I've written example code, which is <a href="http://www.phpbuilder.com/forum/read.php3?num=5&id=27933&loc=0&thread=27933">in my first post</a> at the top of this thread.
thanks,
michael