$x and $y work perfectly, and I believe the problem is the trigger
function.  Thanks to everyone who helped, and as soon as I get a chance
to update and fix, I will try it.  

Thanks,
Nick 

-----Original Message-----
From: Miles Thompson [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 06, 2006 9:15 AM
To: mysql@lists.mysql.com
Subject: Re: Problems Updating Database

At 08:22 AM 9/6/2006, Nicholas Vettese wrote:

>I have a registration script that inserts data into the database, and 
>then emails you an activation code to activate your account.  The 
>problem is that when I click on the link in the email, the account does

>not get updated.  The portion of the script that has a problem is this:
>
>$query = "UPDATE users SET active=NULL WHERE user_id=$x AND active='" .
>escape_data($y) . "' LIMIT 1";
>$result = mysql_query ($query) or trigger_error("Query: $query\n<br 
>/>MySQL Error: " . mysql_error());
>
>I do not believe this is a PHP problem because the error states that it

>is most likely a MySQL error.  If anyone can see the problem, can you 
>please let me know what it is.  I have been looking at this for about 
>three days now, and I can't figure it out.
>
>The registration page does update the DB (MySQL 3.24.49), but the 
>activation page does not.
>
>Thank you,
>Nick

Echo $query; test for existence of $x and $y.

Are you sure you need trigger_error()? Why not just use the built-in
error handling?
In any case, what error message do you get?

HTH - Miles 


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.7/438 - Release Date: 9/5/2006



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]






--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to