Re: Inserting a String Variable into mysql_query() returns "Query was empty" error

From: Date: Tue, 16 Apr 2002 21:35:52 +0000
Subject: Re: Inserting a String Variable into mysql_query() returns "Query was empty" error
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-18572@lists.php.net to get a copy of this message
Are you trying to create a table named "How Are You"? If so, can't do it. It MUST be a one-word name. You would have discovered this yourself had you typed your CREATE statement into the mysql command line. Second ALWAYS include an "or die("Error: ".mysql_error())" part after your mysql_query(). ----- Original Message ----- From: eat pasta type fasta <php@finalbanana.com> To: <php-db@lists.php.net> Sent: Tuesday, April 16, 2002 4:13 PM Subject: [PHP-DB] Inserting a String Variable into mysql_query() returns "Query was empty" error I am creating a string out of bunch of variables and an array and I need it to become a query which will make me a table. It looks like this when I echo it: CREATE TABLE How Are You (Reply1 VARCHAR(255), Reply2 VARCHAR(255), Reply3 VARCHAR(255), Reply4 VARCHAR(255), Reply5 VARCHAR(255), date DATE) and it appears in the code under the name $all_sections, however when I put into the mysql_query function like so: $sql = mysql_query($all_sections); it returns "Query was empty" error, any ideas? Thanks in Advance. R> ________________________--__-______-______________ eat pasta type fasta -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#18572) next »