RE: [PHP] URGENT
| From: | John Holmes | Date: | Wed, 19 Jun 2002 03:03:06 +0000 |
| Subject: | RE: [PHP] URGENT | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-102844@lists.php.net to get a copy of this message | ||
Put a space before WHERE and _ALWAYS_ use MySQL_error() with your
queries... you'll stop wasting your time and ours.
MySQL_query($query) or die("Error in Query: $query >> " .
MySQL_error());
Good idea to print out the query if you can, that way you know what's
actually being sent to MySQL.
---John Holmes...
> -----Original Message-----
> From: Phil Reid [mailto:phil@philip-reid.com]
> Sent: Tuesday, June 18, 2002 7:33 PM
> To: php-general@lists.php.net
> Subject: [PHP] URGENT
>
> I am in urgent need of help! (AGAIN)
>
> Can anyone spot anything wrong with this query?
>
> $sql = "UPDATE IGNORE customer SET forename = '$forename', surname =
> '$surname', e-mail ='$email', company = '$company', homephone =
> '$homephone', workphone = '$workphone', mobilephone =
> '$mobilephone',
> address1 ='$address1', address2 ='$address2', address3 =
> '$address3',
> local = '$local', city = '$city', postcode = '$postcode', id =
> '$id'";
> $sql .= "WHERE username='$username'";
>
> mysql_query( "$sql");
>
> I need to get it working NOW!
>
> I will be very grateful if I receive the same level of help as before.
> Thanks a lot.
>
>
> Phil Reid