Re: MySQL Returns Error
| From: | Jeff | Date: | Tue, 05 Aug 2003 17:14:45 +0000 |
| Subject: | Re: MySQL Returns Error | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-29685@lists.php.net to get a copy of this message | ||
Well I did what you said, and now I get "Parse error: parse error,
unexpected T_ECHO in C:\FoxServ\www\encana_db.php on line 44"
And magic_quotes_gpc was already ON.
"Matt Schroebel" <MSchroebel@hsus.org> wrote in message
news:D4DB668A680B2549AE977FB0B193E2E80144F3AD@email.hsus.org...
> -----Original Message-----
> From: Jeff [mailto:jroth1@telus.net]
> Sent: Tuesday, August 05, 2003 12:59 PM
> To: php-db@lists.php.net
> Subject: [PHP-DB] MySQL Returns Error
>
> Been working on this code all weekend, and I did take
> everyone's advice, but
> I'm still getting the same error. "Error retrieving records.
> From line
> "$result = mysql_query($query, $link_id) OR DIE("Error retrieving
> records."); " of my code. When I first put the insert query
> in, it allowed
> me to add one record, then started returning the error, and
> hasn't let me
> enter another record since.
Change that line to:
$result = mysql_query($query, $link_id) OR DIE(echo mysql_error());
Make sure you either have magic_quotes_gpc on or (better) have
magic_quotes_gpc off and addslashes() to each of the values you're
inserting into the db.