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
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
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
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.
;
>
>
>
> 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
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
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:
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
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
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");
10 matches
Mail list logo