True way to see if action was successful?


Posted on 16th Feb 2014 07:03 pm by admin

If this is a good way to see if action was successful to continue:

Code: function changeGameState($GameId)
{
mysql_query("UPDATE challenges SET status=status+1 WHERE id='$GameId'");
}

if (changeGameState($someId))
{
//was successful
}
I dont know if it work or not, but i think no because changeGameState wont return any value, so I came up with another idea, but it gives me "Parse error: syntax error, unexpected T_RETURN " error in "return 0" line

Code: public function changeGameState($GameId)
{
mysql_query("UPDATE challenges SET status=status+1 WHERE id='$GameId'")or die(return false);
return true;
}
how can i check if action was succesful before continuing?

No comments posted yet

Your Answer:

Login to answer
135 Like 30 Dislike
Previous forums Next forums
Other forums

Material Master Update through BAPI - Follow up material not updated
Hi Experts,

I am updating the material master through a custom transaction using the BAPI

Session is not saving
I am not trying to do anything too fancy, I am just trying to get some $_SESSION data to save and us

TimeStamp Column Problem...
I'm mad at my self and thinking I'm a little retarded. It just be some one mistake I'm missing here.

Share admin accross websites
I'm using .net memberships and roles in one of my sites, but I need to be able to share logins and p

Saas with SAP R/3
hi experts,

Is SaaS offer available in SAP? for SAP R/3? from where i can get the info a

Php navigation
I have four buttons on a php page.
If i click a button it will redirect to different php pages.

cookie problem
I hv a website url
In this site main menu functionality based on cookie when user click on parti

socket communication between c++/java and sending image
hi,

i have a class in c++ called win32_sockserver which creates socket to java. i am trying

PHP Surveys
I really would like some advice.

If you have a client come to you asking for a survey to be d

date("now") prints out wrong date ?
Hi Guys
Anyone know why and how I can fix it ?

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash