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?
Problem with DB connection
Hello there! I'm new to this forum and I'm new to PHP coding also. I wrote something that doesn't make exactly what I thought it will. Can you give me a hand please. There we go:Code: [Select]
New to Arrays
Hi I am new to PHP (a week and a half now) and I am just beginning to read about arrays. I understand simple arrays, associative arrays, and multidimensional arrays also. The book I am reading
CHECK A STRING FOR ' " ' (DOUBLE QUOTES)
I am checking for delimiter (.!?) and if there is a " after a sentence then it should neglect and start from next sentenceI am splitting into two sentences"This is first sentence." This
Progress bar tracking file downloads
Hey guys, was wondering if there was a way to track how far a file has been downloaded. I know there is a way to track uploading with APC and php 5.2 + ?? any suggestions thanks
problem in program for counting no of chars using pointers
Hi all, I was trying to make a program which counts number of chars in a string using concpt of pointers. Following is the code:
Help With editting and deleting form
Hallo !!So look at this image :http://img194.imageshack.us/img194/8272/snapshot5f.png This table prints the titles of entries from a table in a database.. The code that i use for this table is this
b+ tree
Hi can every body help me about b+ tree ?(insert & delete)
Hi, explode and strstr.
Hi, I seem to be confused about the strstr function, eg. i have a string like:"a.b.c.d.e.f""a.b.c.d.e"I always want it to split at the second "." from the end, so
MII Netweaver Server stopped due to CPIC connection Problem
Dear Experts,
Javascript using window.location seems to lose state
Not sure what forum so let me know if I'm in the wrong place.