Re: multiple queries in PHP to mysql database.

From: Date: Fri, 28 Mar 2003 12:31:42 +0000
Subject: Re: multiple queries in PHP to mysql database.
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-26668@lists.php.net to get a copy of this message
Hi Jerry Inline comments.... On 28 Mar,2003 at 12:31 JeRRy JeRRy wrote: > > How can I update 2 tables at once if a match occours > from information inputed into a PHP form. > How about turning this around and re-organising the data a little? Why not have a single score table with references to a central username / pw / id table. Table 1 - users id username password Table 2 - scores id userid game1 game2 game3 game4 ... overall You can then do UPDATE table2 SET game1=game1+1, overall=overall+1 WHERE userid = $userid Getting a results table would then be a single query... Does this help at all ? Hopefully I've grasped enough of the concept to not make a complete fool of myself !!!!! > > Jerry >

« previous php.db (#26668) next »