
shane18
Members-
Posts
283 -
Joined
-
Last visited
Never
Everything posted by shane18
-
Is the only time you can use a assignment operator in a condition, is when your getting data out of a database using a while loop. For Example: while($ROW = $RESULT->fetch_object()){ //Code }
-
@>IF STATEMENT<@ if($A) if(!$A) if($A == $B) if($A != $B) if($A >= $B) if($A <= $B) if($A > $B) if($A < $B) if($A === $B) if($A !== $B) if($A && $B) if($A || $B) if($A == $B && $C) if($A == $B && $C == $D) if($A == $B || $C == $D) if($A && $B == $C && $D > 1) EXAMPLE if($LAST_ACTIVITY >= time() + 3600){ echo "ONLINE"; }else{ echo "OFFLINE"; } @>WHILE LOOP<@ while($A > 2) while($A < 2) while($A >= 2) while($A <= 2) while($ROW = $RESULT->fetch_object()) EXAMPLE while($BUDDY = $BUDDIES->fetch_object()){ echo "$BUDDY<BR>"; } Are all these ways correct syntax?
-
Sooo, I'm guessing no one knows the answer to my question?
-
That is how I would usually do it, but I'm trying to understand the why if/while statements behave like this... while($GROUP = $GROUPS->fetch_object() && $GROUP_SET == 1){ -Don't Work while($GROUP_SET == 1 && $GROUP = $GROUPS->fetch_object()){ -Works Why does the order of the expressions make a change on whether it works or not?
-
I want to run a while loop that lists the persons groups if the person has groups enabled..... while($GROUP = $GROUPS->fetch_object() && $GROUP_SET == 1){ Why doesn't this work? $GROUP keeps equaling 1... but if I take out the && $GROUP_SET == 1 it doesn't equal 1...
-
So even though my way worked, its better practice to do it your way?
-
if($STATUS_CHECK4->last_activity >= time() + 3600){ This works, but is it bad programming to do stuff like time() + 3600 in a if statement... instead of doing $TIME = time() + 3600; and then just putting $time?
-
omg man thanks for that example that was pro
-
Can someone SIMPLY tell me why u should put the ` around table/column names?
-
so more less it tells the computer that its not a special function or etc.... it tells it that it is a table/column name?
-
Whats it do though? For example... title don't work... `title` does work
-
Is it good programming to put a ` around all of your tables, and columns in all of your statements? Also can someone explain to me what the ` does?
-
I don't understand why whenever i store a single float or double float in my mysql database... its only accurate up to a certain point... then there are random numbers to fill out the rest of the space... can someone please help explain how floats work in simple terms lol and also, why is a decimal accurate... when floats arent? -Thanks
-
Why is a decimal data type more accurate then a double float data type?
-
Why is a decimal data type more accurate then a double float data type?
-
What I'm sorta looking for is a few examples of how which each of those data types would be used and how it would be used.
-
Can someone please explain what these terms are for and also show a few examples. Decimal/Float/Double -Thanks
-
So if I create a X-Header... the header will carry with the replied e-mail?
-
More or less, i need a way to send a e-mail to a mobile phone*will receive it as a txt*, and when the person hits reply and sends a message back.... all the emails will go to 1 email address... and i have a script that will read each one and based on a id passed along will sort it to the right user. what i can't figure out, is how to somehow pass a id along with the reply either through an header or some other way...
-
i didn't mean that I wanted to pass a php session id... it could be named anything as long as it stores a id # and when the person who receives my message replies to it, the id # carries with it...
-
Is there any way where I can insert a header into a e-mail that is sent to a mobile phone, so that when they reply back my script can read the header to get a session id so I know where the reply must be redirected to?
-
i didn't know this, thanks
-
Before you all go yelling at me for not filtering the input data, only I will be using this program from a home server so i ain't worried about it. Why don't this work? $DATABASE->query("INSERT INTO movies (title,case,number) VALUES('{$_POST["title"]}','{$_POST["case"]}','{$_POST["number"]}')");
-
Other than making sure the database connects correctly, should i worry about handling query errors since they rarely happen, and besides ill only have maybe a max of 50 on my site at a time...
-
What is the big difference between $radius = 3959 * acos(sin($lat1) * sin($lat2) + cos($lat1) * cos($lat2) * cos($long2 - $long1)); and a2 + b2 = c2 I know it has something to do with the earth not being perfectly sphere... What is the max amount of miles you can go up to with (a2 + b2 = c2) and it is still accurate.