Re: Subject: Update data problem

From: Date: Thu, 24 Jun 2004 15:51:09 +0000
Subject: Re: Subject: Update data problem
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-34916@lists.php.net to get a copy of this message
Is there any obvious reason why you're not doing this in one query $query = "UPDATE media SET A='$A', B='$B', C='$C', G=E*'$C'"; Or have I missed something here ? Cheers - Neil At 10:07 24/06/2004 +0000, you wrote:
MIME-Version: 1.0 Content-Type: multipart/alternative;
        boundary="----_=_NextPart_001_01C459A5.F8D9AF1D"
Date: Thu, 24 Jun 2004 14:44:45 +1000 Message-ID: <39B7E7009F2DD840AA747934AB551E6917169B@exnsw1-arm.nsw.csiro.au> From: <Justin.Baiocchi@csiro.au> To: <php-db@lists.php.net> Subject: Update data problem if($update) { mysql_pconnect("localhost","root","password"); mysql_select_db("options"); $query = "UPDATE media SET A='$A', B='$B', C='$C'"; $result = mysql_query($query); $query = "SELECT C, G FROM media"; $result = mysql_query($query); $E= "$C*$G"; $query = "UPDATE media SET E='$E'"; $result = mysql_query($query); }
======================================================== CaptionKit http://www.captionkit.com : Production tools for accessible subtitled internet media, transcripts and searchable video. Supports Real Player, Quicktime and Windows Media Player. VideoChat with friends online, get Freshly Toasted every day at http://www.fresh-toast.net : NetMeeting solutions for a connected world.

« previous php.db (#34916) next »