Re: Why not ?
| From: | Simon Rees | Date: | Thu, 24 Mar 2005 18:03:38 +0000 |
| Subject: | Re: Why not ? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-39032@lists.php.net to get a copy of this message | ||
On Thursday 24 March 2005 17:26, JeRRy wrote:
>
> I was getting an error earlier stating round1 does not
> exist, however it does. round1 table does not exist.
> So does not say round1.game1 does not exist.
Does a table named round1 exist in your database?
If so and you are using mysql > 4.0.4 you will need to mention all tables
referenced in the WHERE clause in the UPDATE clause. e.g.
UPDATE tipping, round1
SET tipping.score = 3
WHERE round1.game1 = 'H'
AND tipping.username = 'jerry'
(assuming the score column you want to update is in the tipping table...)
You almost certainly want to join the two tables as well but without knowing
your database it is impossible for me to say how.
If you are using an older mysql version what you want to do is probably
impossible in one statement.
Simon
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Simon Rees | tech-lists@zodiac2000.co.uk |
ORA-03113: end-of-file on communication channel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~