Jump to content

[SOLVED] update in mysql


alin19

Recommended Posts

$query="UPDATE test SET tra='$arr[0]', simbol='$arr[2]', piata='$arr[1]', bidvol='$arr[3]', bestbid='$arr[4]' , bestask='$arr[5]' , bidask='$arr[6]' , pret='$arr[8]' , volum='$arr[7]' , nrtra='$arr[9]' , data='$arr[10]' , var='$arr[11]' WHERE simbol='$arr[2]'";

 

 

if (mysql_query($query))

{

echo 'good';

}

else

{

echo 'bad';

}

 

--------if (int mysql_affected_rows ( (resource $link_identifier) )=0)

 

{

$query= "INSERT INTO `test` ( `id` , `tra` , `simbol` , `piata` , `bidvol` , `bestbid` , `bestask` , `bidask` , `pret` , `volum` , `nrtra` , `data` , `var` )

VALUES (

'', '$arr[0]', '$arr[2]', '$arr[1]', '$arr[3]', '$arr[4]', '$arr[5]', '$arr[6]', '$arr[8]', '$arr[7]', '$arr[9]' ,  '$arr[10]', '$arr[11]'

)";

}

 

 

 

i'm still geting an error  at that line:

 

PHP Parse error:  syntax error, unexpected T_VARIABLE  on line 42

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.