Some help here :S

Place for questions and answers for all newcomers and new coders. This is a free for all forum, no question is too stupid and to noob.
Post Reply
User avatar
begood
Posts: 13
Joined: Fri Sep 09, 2011 11:23 am

Some help here :S

Post 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.
Image
User avatar
Ark
Posts: 427
Joined: Wed Jun 01, 2011 10:25 pm

Re: Some help here :S

Post 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;
} 
Orgullo Catracho
User avatar
begood
Posts: 13
Joined: Fri Sep 09, 2011 11:23 am

Re: Some help here :S

Post 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?)
Image
User avatar
Ark
Posts: 427
Joined: Wed Jun 01, 2011 10:25 pm

Re: Some help here :S

Post by Ark »

Ya i was on rush xD

well just put
Orgullo Catracho
User avatar
begood
Posts: 13
Joined: Fri Sep 09, 2011 11:23 am

Re: Some help here :S

Post 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.
Image
Post Reply

Return to “Beginner Help and Support”