Thanks for your attention to this matter Christopher,

Christopher Ostmo wrote:

> If you do not list a table in the UPDATE parameter, you cannot 
> reference that table from anywhere else within your query. The same is 
> true of SELECT statements - you cannot reference a table that is not 
> listed in the FROM clause. The same is true of UPDATE and many 
> other commands.  There's a table selection parameter for most SQL 
> queries (at least those that actually query), and you cannot point to 
> tables later in your query that are not listed.


Good explaination, thanks!

But can you UPDATE or INSERT into multiple tables using the same query?

You can SELECT multiple fields FROM multiple tables, but I ran into an error 
when I tried to use UPDATE with this same logic.


> In other words, you cannot tell it to "update table1 where table2 = ..." If 
> you haven't told it to do an action (update in this case) on table2, it's 
> going to wonder what the heck those tables have to do with each other 
> and exit with an error.  This is an oversimplification of what "really" 
> happens, but this message is way too short to go into that in any detail.


You've given lots of detail, and I just want the script to work, rather than 
learning what "really" happens.  :)


> You should either pour through the documentation section at 
> mysql.com or get the book "MySQL" by Paul DuBois.  The docs may 
> be difficult to get through for newbies, but they are precise and contain a 
> lot of info.  The book on the otherhand starts at the beginning and holds 
> your hand into the more difficult aspects. The book even goes into 
> details about how MySQL works that makes it so that you can't do what 
> you are attempting above.


I'll look for the book.  I've found a number of MySQL Tutorials online that have 
been useful.  However I keep running into these gaps in my understanding.  I 
will look for Paul's book.  Likely tomorrow.  Thanks for the led.


> Open Source Applications:
> http://open.AppIdeas.com/

I think I've email you a about your calendar script.  Thanks again for your help!


Mike
-- 
Mike Gifford, OpenConcept Consulting, http://openconcept.ca
Offering everything your organization needs for an effective web site.
Abolish Nuclear Weapons Now!: http://pgs.ca/petition/
It is a miracle that curiosity survives formal education. - A Einstein


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to