can't update!!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
hmsg
Forum Commoner
Posts: 42
Joined: Sun May 14, 2006 9:48 am

can't update!!

Post by hmsg »

for some reason i can't update my registers here is my code:

PHP:

Code: Select all

<?
$sql_update = "UPDATE materiais SET
						(cod_material='".$cod_material."', 
						descricao_material='".$descricao_material."',
						preco_compra_material='".$preco_compra_material."', 
						medidas_material='".$medidas_material."')
						WHERE id_material='".$id_material."'";
$resultado = mysql_db_query($database_BD ,$sql_update);
?>
I also try this:

PHP:

Code: Select all

<?
$sql_update = "UPDATE materiais SET
						(cod_material='$cod_material', 
						descricao_material='$descricao_material',
						preco_compra_material='$preco_compra_material', 
						medidas_material='$medidas_material')
						WHERE id_material='$id_material'";
$resultado = mysql_db_query($database_BD ,$sql_update);
?>

Any of this workout!!

What i'm doing wrong?


Sami | please use the

Code: Select all

tag to post code. Thanks![/color][/size]
hmsg
Forum Commoner
Posts: 42
Joined: Sun May 14, 2006 9:48 am

Post by hmsg »

I've already saw what is wrong

the set don't use the ()

:)
Post Reply