(You always need to include the list on all responses. In this case, I do
not work in PHP enough to be able to help with this particular problem but
I know there are several PHP experts on the list.) -- SG
----- Forwarded by Shawn Green/Unimin on 04/15/2005 02:38 PM -----
Aji Andri <[EMAIL PROTECTED]> wrote on 04/15/2005 02:30:38
PM:
> I'm sorry if I didn't make it so clear, here is what
> I'm doing,
>
> -------script start here-----------
> $query = "select a.*, b.sty_descr as styname from
> STY_REPORT_200501 a left join STY_ITEM b on
> a.std_item=b.sty_code where a.std_nis=" . $stid;
>
> $result = mysql_query($query) or die("Query " .
> $_SERVER["PHP_SELF"] . " : " . $query . " failed");
>
> $ccount = mysql_num_rows($result);
>
> while ($nline = mysql_fetch_array($result)) {
>
> echo $nline["std_item"];
> echo $nline["std_value"];
> --------end first script--------------
>
> this script have output is like this
> ----result------------
> STY REPORT
>
> std_nis std_class std_item std_value
> 111 1 1 8 -----1st row
> 111 1 2 7 -----2nd row
> 111 1 5 6 -----3rdt row
> 111 1 4 9 -----4th row
> 222 3 1 6
> 222 3 2 5
> 222 3 3 6
> --------end result------------
>
> and the result POST to the second script
>
> -------second script----------------
>
> $_SESSION["action"]=="EDITNilai"){
>
> $query = "update STY_REPORT_200501 set std_value='"
> . $nenilai . "', std_nis='" . $nenis . "', std_item='"
> . $neitem . "', std_entusr='" . $neentusr . "' where
> std_item=".$neitem ;
>
> -------end second script------------
>
> after executed the second script the result is like
> this
>
> -------2nd result----------
> std_nis std_class std_item std_value
> 111 1 1 8 -----1st row
> 111 1 1 8 -----2nd row
> 111 1 1 8 ------3rd row
> 111 1 1 8 -----4th row
> 222 3 1 8
> 222 3 2 5
> 222 3 3 6
> -------end 2nd result-----------
>
> the update based on std_nis make all std_item become
> same, how to update the multi row with it content
> without change other row in same std_nis in one query
> ?
> I'm hoping the update chane in std_value only
>
>
> ------hoping result------------
> std_nis std_class std_item std_value
> 111 1 1 6 -----1st row, old=8
> 111 1 2 5 -----2nd row, old=7
> 111 1 5 2 -----3rdt row, old=6
> 111 1 4 7 -----4th row, old=9
> 222 3 1 6
> 222 3 2 5
> 222 3 3 6
> --------end result------------
>
> I hope that clear enough, is there any way to make it
> work ?
>
>
>
> __________________________________
> Yahoo! Mail Mobile
> Take Yahoo! Mail with you! Check email on your mobile phone.
> http://mobile.yahoo.com/learn/mail