Re: [PHP-DB] mysql error and resource ID:

2004-10-18 Thread John Holmes
Stuart Felenstein wrote: First time setting something like this up. So probably making some major mistakes. Anyway I get this message : "mysql_error(Resource id #2)" [snip] echo " . mysql_error($link)"; Read the above line or use an editor that does syntax highlighting. Also, you'll want to get th

RE: [PHP-DB] mysql error and resource ID:

2004-10-14 Thread Stuart Felenstein
t; integers, right? So put single > quotes around the whole date, like '10/15/2004'. > > dave > > > > > > Stuart Felenstein <[EMAIL PROTECTED]> > > 10/14/2004 10:02 AM > > > > > > To: > Stuart Felenstein <[EM

RE: [PHP-DB] mysql error and resource ID:

2004-10-14 Thread Stuart Felenstein
Anyone see something wrong here : My error message is : "0: 1064: 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 'd',1,'d',1,1, 31, 33,10/15/2004))' at line 5" Code: $query = "INSERT INTO MainTabl

RE: [PHP-DB] mysql error and resource ID:

2004-10-14 Thread Graham Cossey
From: Stuart Felenstein [mailto:[EMAIL PROTECTED] > Sent: 14 October 2004 15:43 > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP-DB] mysql error and resource ID: > > > Quote as in "string" or quote as in 'string' ? > Those two confuse me.

RE: [PHP-DB] mysql error and resource ID:

2004-10-14 Thread Stuart Felenstein
; > > > > Stuart Felenstein <[EMAIL PROTECTED]> > > 10/14/2004 08:26 AM > > > > > > To: > Graham Cossey <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] > cc: > > > > > > Subject: > RE: [PHP-DB] mysql error and reso

RE: [PHP-DB] mysql error and resource ID:

2004-10-14 Thread Stuart Felenstein
Well believe it or not I got it right finally. Just used the example from the manual. Meanwhile, the funny thing is , I think the error translates back to my original error abut Resource ID#2 Because not I get : Check the manual that corresponds to your MySQL server version for the right syntax t

RE: [PHP-DB] mysql error and resource ID:

2004-10-14 Thread Graham Cossey
Stuart, you need to define $link if you're going to use it ;) > > Not much luck here on placing the mysql_error($link); > I know the server and database is reachable. So I > imagine the error is happening in the query. I've > moved the $link around with no luck. > > Stuart > > Revised code below:

RE: [PHP-DB] mysql error and resource ID:

2004-10-14 Thread dpgirago
If any of the variables used to insert data are strings ($f1a, $f2a, etc...), you'll need to have quotes around them. dave Stuart Felenstein <[EMAIL PROTECTED]> 10/14/2004 08:26 AM To: Graham Cossey <[EMAIL PROTECTED]>, [EMAIL PROTECTED] cc: Subject: RE: [PH

RE: [PHP-DB] mysql error and resource ID:

2004-10-14 Thread Stuart Felenstein
Not much luck here on placing the mysql_error($link); I know the server and database is reachable. So I imagine the error is happening in the query. I've moved the $link around with no luck. Stuart Revised code below: --- Graham Cossey <[EMAIL PROTECTED]> wrote: -- PHP Database Mailing Lis

RE: [PHP-DB] mysql error and resource ID:

2004-10-14 Thread Graham Cossey
A few ideas... [snip] > Anyway I get this message : "mysql_error(Resource id > #2)" > [snip] > @mysql_connect("myserver","myusername", "mypassword") > or die(mysql_error()); > > @mysql_select_db("mydatabase") or die(mysql_error()); > $link = mysql_connect("myserver", "myusername", > "mypassword");