Page 1 of 1
Some help here :S
Posted: Sat Sep 10, 2011 4:09 pm
by begood
Hey guys,
I need a if function who search on "uacoes" if on X id, idacao is = to acaoid. If true update the table (i know the function to update the table, i just dont know the if function...)
I hope you can help here.
Regards.
Re: Some help here :S
Posted: Sat Sep 10, 2011 4:51 pm
by Ark
search where on the database?!
well an if statement could be...
Code: Select all
if ($idacao == $acaoid)
{
$sql = "update table set value = '$value' where id='$acaoid'";
mysql_query($$sql) or die;
}
Re: Some help here :S
Posted: Sat Sep 10, 2011 4:58 pm
by begood
That's exactly what I want, thanks!
But you have an error on you're code, it should be like that:
Code: Select all
if ($idacao == $acaoid)
{
$sql = "update table set value = '$value' where id='$acaoid'";
mysql_query($sql) or die;
}
(Off-Topic: how do you put colors on the codes?)
Re: Some help here :S
Posted: Sat Sep 10, 2011 5:38 pm
by Ark
Ya i was on rush xD
well just put
Re: Some help here :S
Posted: Sat Sep 10, 2011 5:47 pm
by begood
ahaha xD
I put that bbcode every time I post a php code but colors didn't appear :c
But, no problem, that's don't matter.