|
Home > Archive > MySQL ODBC Connector > February 2006 > using WHERE and OR in a query
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
using WHERE and OR in a query
|
|
| Bruce Therrien 2006-02-28, 8:28 pm |
| Why does this query not work using mysql 3.23.58?
$SQL =<<SQL;
UPDATE $tablename SET rank = '$qdj_rank_en', rank_icon = '$qdj_rank_icon', qdj = qdj+'$adata{qdj_credit}', gold = gold+'$adata{gold_credit}' WHERE subscribe != '' OR artist = '1' OR rank_change != '1'
SQL
$dbh->do($SQL) || &cgierr("Reason: $!");
--
Bruce Therrien <bruce.therrien@wm-mw.org>
This is the end of the internet.
Please turn around and go back.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw
| |
|
| Define "not work": do you mean you get a compile error? A runtime error? Or
a result that differs from what you expected?
If you got an error message, please state the full message text. If the
result simply differed from what you wanted, please give us a small sample
of data, your expectations for what the result should have been, and
information about what you actually got.
The CREATE TABLE statement could also be helpful in determining what went
wrong.
--
Rhino
----- Original Message -----
From: "Bruce Therrien" <bruce.therrien@wm-mw.org>
To: <mysql@lists.mysql.com>
Sent: Saturday, February 25, 2006 4:28 PM
Subject: using WHERE and OR in a query
> Why does this query not work using mysql 3.23.58?
>
> $SQL =<<SQL;
> UPDATE $tablename SET rank = '$qdj_rank_en', rank_icon = '$qdj_rank_icon',
> qdj = qdj+'$adata{qdj_credit}', gold = gold+'$adata{gold_credit}' WHERE
> subscribe != '' OR artist = '1' OR rank_change != '1'
> SQL
> $dbh->do($SQL) || &cgierr("Reason: $!");
>
>
>
> --
> Bruce Therrien <bruce.therrien@wm-mw.org>
>
> This is the end of the internet.
> Please turn around and go back.
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql? unsub...ati
co.ca
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.375 / Virus Database: 268.1.0/269 - Release Date: 24/02/2006
>
>
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.1.0/269 - Release Date: 24/02/2006
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql? unsub...sie.nctu.edu.tw
|
|
|
|
|