|  | Posted by max on 08/13/05 16:25 
On Sat, 13 Aug 2005 11:19:40 +0200, Stefan Rybacki <stefan.rybacki@gmx.net>wrote:
 
 >max wrote:
 > > ,,,
 >>
 >> Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
 >> resource in
 >> blah-blah/create_dbase.php on line 24
 >>
 >
 >
 >How about using mysql_error()?
 >
 >Regards
 >Stefan
 The following (if I have it right)
 
 <?
 $TableName=rand(12345, 99999);
 connect string
 
 print("$TableName");
 
 $Query = "CREATE TABLE $TableName
 (
 'id' 'SMALLINT' 'NOT NULL',
 'firstname' 'VARCHAR(255)' 'NOT NULL'
 )";
 $Result=mysql_db_Query ($DBName, $Query, $Link);
 if (!($Result=mysql_db_query ($DBName, $Query, $Link)))
 {
 print("<br>errno: " .mysql_errno() );
 print("<br>error: " . mysql_error() );
 ?>
 
 brings
 
 errno: 1064
 error: You have an error in your SQL syntax. Check the manual that
 corresponds to your MySQL server version for the right syntax to use near
 '71010 ( 'id' 'SMALLINT' 'NOT NULL', 'firstname' 'VARCHAR(255)'
 creation
 
 
 in its wake, and I'm not much clearer.  Can you help further?
  Navigation: [Reply to this message] |