[PHP-DB] RE: Subject: Update data problem

2004-06-24 Thread Justin.Baiocchi
Hi Neil,

I have tried it like that with no luck, what is below just happens to be
my latest attempts to get it working.

What is happening is that it is saying that $C and $G are zero, when in
fact there is data in there.

How do I get it to 'refresh' the variables? That is what I am trying to
do with:
>$query = "SELECT C, G FROM media";
>$result = mysql_query($query);


-Original Message-
From: Neil Smith [MVP, Digital media]
[mailto:[EMAIL PROTECTED] 
Sent: Friday, 25 June 2004 1:51 AM
To: [EMAIL PROTECTED]
Cc: Baiocchi, Justin (LI, Armidale)
Subject: Re: Subject: Update data problem


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 +, 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:
<[EMAIL PROTECTED]>
>From: <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>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.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: Subject: Update data problem

2004-06-24 Thread Neil Smith [MVP, Digital media]
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 +, 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: <[EMAIL PROTECTED]>
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php