For Programmers: Free Programming Magazines  


Home > Archive > PHP SQL > June 2005 > mysql query (insert update)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author mysql query (insert update)
BBFish

2005-06-05, 3:56 am

$sql15 ="SELECT * FROM ".$table['clie']."ripa WHERE ir_contr = 'P';";
$result15 = $db->sql_query($sql15);
while($row15=$db->sql_fetchrow($result15)){
$sdl ="INSERT INTO ".$table['maga']."ordini SET
wh_mz='".$row15['ir_mz']."',
wh_ci='".$row15['ir_ci']."',
wh_quantita='".$row15['ir_qty']."',
wh_prezzo='".$row15['ir_list']."',
wh_iv='".$row15['ir_iv']."',
wh_daordine=NOW(),
wh_ru='".$row15['ir_ru']."',
wh_fp='".$row15['ir_fp']."',
wh_condiz='P'
";
$ddl=$db->sql_query($sdl);
if($ddl == TRUE){
echo $upd = "UPDATE ".$table['clie']."ripa SET ir_contr = 'O' WHERE
IR='".$row15['IR']."';";
$db->sql_query($upd);
}
}

they give of the errors if the script comes in a hurry refresh,
exists the possibility one to make it in an only one query?
trancks


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com