On Monday 24 March 2003 17:30, JeRRy wrote: > I have a query to update a database via PHP after a > form is inputed. The form results do a match to the > database and if a match occours updates a field with > +1 and if no matches it does nothing. > > Now I want it so if +1 is done I want another table to > update as +1 also. How would I achieve this in PHP? > I'd prefer to keep it all on one page to make it alot > easier to manage. SO if +1 in table1 than update > table2 with +1 also. If no matches than do nothing to > both. > > Could someone please help me with this, is it a 'if' > statement or something? Help is appreciated and > thanks in advance. > > I alsready have the script to update table1 and does > this fine but am not sure how to do mulitple queries > in the one PHP page.
Quite simply, repeat what you did for the first table on the second table, pseudo-code: if (match) { update_table1; update_table2; } -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-db ------------------------------------------ /* Order and simplification are the first steps toward mastery of a subject -- the actual enemy is the unknown. -- Thomas Mann */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php