Re: MySQL Returns Error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Awesome, that you ALL for your help - the error is gone and I can post to
the DB now, and it works!

But... *grin*

Every time I access or refresh the page, it adds one blank entry to the DB.

Maybe I have the insert query in the wrong place?


"Matt Schroebel" <MSchroebel@hsus.org> wrote in message
D4DB668A680B2549AE977FB0B193E2E80144F3AD@email.hsus.org">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:  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.



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux