RE: [PHP] INSERT problem with MySQL/PHP

2001-06-19 Thread Jason Murray
> 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 questio

Re: [PHP] INSERT problem with MySQL/PHP

2001-06-18 Thread Todd A. Jacobs
On Mon, 18 Jun 2001, Todd A. Jacobs wrote: > $sql = "INSERT INTO question VALUES (NULL, $user_idx, $objective, > '$question', '$question_type', NULL, NULL)"; > > $result = mysql_db_query('item_db', $sql_query, $connection_id); Thanks to all who answered. It was a simple mistake, bu

Re: [PHP] INSERT problem with MySQL/PHP

2001-06-18 Thread Ethan Schroeder
uot; <[EMAIL PROTECTED]> Sent: Monday, June 18, 2001 4:11 PM Subject: [PHP] INSERT problem with MySQL/PHP > PHP: 4.0.4pl1 > MySQL: 3.23.36-1 > > I have the following code fragment, which uses the same connection > parameters elsewhere to *successfully* to retrieve data from a

Re: [PHP] INSERT problem with MySQL/PHP

2001-06-18 Thread Miles Thompson
Todd, Did you echo $sql and examine it? Did you try the statement at the mysql console? Does the list of values exactly match the field list? Did you try the alternate syntax INSERT [LOW_PRIORITY | DELAYED] [IGNORE] [INTO] tbl_name SET col_name=expression, col_name=expression, ... as in the

Re: [PHP] INSERT problem with MySQL/PHP

2001-06-18 Thread Developer
"Todd A. Jacobs" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent: Monday, June 18, 2001 4:11 PM Subject: [PHP] INSERT problem with MySQL/PHP > PHP: 4.0.4pl1 > MySQL: 3.23.36-1 > > I have the following code fragment, which uses the same

Re: [PHP] INSERT problem with MySQL/PHP

2001-06-18 Thread David Robley
On Tue, 19 Jun 2001 08:41, Todd A. Jacobs wrote: > PHP: 4.0.4pl1 > MySQL: 3.23.36-1 > > I have the following code fragment, which uses the same connection > parameters elsewhere to *successfully* to retrieve data from a > database, so this doesn't appear to be a permissions problem with > MySQL. >

Re: [PHP] INSERT problem with MySQL/PHP

2001-06-18 Thread Tom Carter
; <[EMAIL PROTECTED]> Sent: Tuesday, June 19, 2001 12:11 AM Subject: [PHP] INSERT problem with MySQL/PHP > PHP: 4.0.4pl1 > MySQL: 3.23.36-1 > > I have the following code fragment, which uses the same connection > parameters elsewhere to *successfully* to retrieve data fr

[PHP] INSERT problem with MySQL/PHP

2001-06-18 Thread Todd A. Jacobs
PHP: 4.0.4pl1 MySQL: 3.23.36-1 I have the following code fragment, which uses the same connection parameters elsewhere to *successfully* to retrieve data from a database, so this doesn't appear to be a permissions problem with MySQL. However, nothing happens with inserts; no rows are added at al