ecrement the items in stock by 3.
>
> Just an idea...
>
> Do you know about database normalization? How is the database designed?
>
>
>
> -Original Message-
> From: elias [mailto:[EMAIL PROTECTED]]
> Sent: August 2, 2001 6:32 PM
> To: [EMAIL PROTECTED]
&g
Come on, you're pushing SQL in directions it's not supposed to go! It is
set oriented after all.
So it's experimentation time. I've never tried, but as LIMIT works on a
SELECT, try it on an update. And let us know what happened.
Miles
At 10:30 AM 8/2/01 +0200, elias wrote:
>How can I update on
Miles,
The LIMIT works great with UPDATE too.
"Miles Thompson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Come on, you're pushing SQL in directions it's not supposed to go! It is
> set oriented after all.
> So it's experimentation time. I've never tried
the database designed?
-Original Message-
From: elias [mailto:[EMAIL PROTECTED]]
Sent: August 2, 2001 6:32 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] MySql help #1
Someone purchased items from my site let's say 3 items out of 5 total. All
items are the same. I just want to update 3
$count]=$resultset ["ID"];
> $count++;
> }
>
>
> for ($count=0;$count<2;$count++){
> "update table1 set field='VALUE' WHERE ID=".$array[$count]";
> $result = mysql_query ($sqlstring,$db) or die (mysql_error());
> }
>
> -Original Me
ot;update table1 set field='VALUE' WHERE ID=".$array[$count]";
$result = mysql_query ($sqlstring,$db) or die (mysql_error());
}
-Original Message-
From: elias [mailto:[EMAIL PROTECTED]]
Sent: August 2, 2001 4:30 PM
To: [EMAIL PROTECTED]
Subject: [PHP] MySql help
How can I update only N fields from the database?
usually we do:
UPDATE table1 SET field='VALUE' WHERE condition1
now I want to update fields with a certain condition but only X fields out N
total fields.
ie:
id value
--- ---
1a
2b
3c
4d
5e
how can i update such lik
7 matches
Mail list logo