You can't
well, not via PHP anyway. You would need to do a select first to establish
if any of these values exist in the database. Something like...
select first,last,email from mytable where first=x or last=y or email=z;
then check which one of first,last,email is non-empty.
BUT.. do you *
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says...
> I have the following code:
>
>
> $sql = "UPDATE class_sub SET desc = '$catdesc', sub_cat = '$subcatname'
> WHERE id='$catid'";
> echo $sql;
> $sql_result = mysql_query($sql);
> if (!$sql_result)
> {
> echo "Couldn't update
In article <[EMAIL PROTECTED]>, Phil Schwarzmann wrote:
> $query = "UPDATE table SET (var1, var2, var3) VALUES ($var1, $var2,
> $var3) WHERE username='$username'";
>
>
> Im wondering cause I have an INSERT query
>
> $query = "INSERT INTO table (var1, var2, var3) VALUES ($var1, $var2,
> $
Greg,
You must specify the tablename :)
Like this:
UPDATE myTableName ...
or
mysql> UPDATE persondata SET age=age+1;
For the official syntax visit mysql language reference at http://www.mysql.com at
http://www.mysql.com/doc/U/P/UPDATE.html
Kind Regards,
Richard Creech
[EMAIL PROTECTED]
250.744
4 matches
Mail list logo