RE: [PHP] INSERT problem with MySQL/PHP

From: Date: Tue, 19 Jun 2001 06:21:30 +0000
Subject: RE: [PHP] INSERT problem with MySQL/PHP
Groups: php.general 
Request: Send a blank email to php-general+get-54332@lists.php.net to get a copy of this message
> Can anyone tell me what might be wrong? > > $user_idx = 1; > $objective = 1; > $question = 'Foo'; > $question_type = 'singular'; > > $connection_id = mysql_connect ('192.168.1.1', 'php', > 'password') > or die ("No connection.\n"); > > $sql = "INSERT INTO question VALUES (NULL, $user_idx, $objective, > '$question', '$question_type', NULL, NULL)"; > > $result = mysql_db_query('item_db', $sql_query, $connection_id); ^^^^^^^^^^ I daresay this will be the problem since the SQL is in $sql. Jason

« previous php.general (#54332) next »