pro_php thread: SV: Re: Values not showing up.
>$sql =3D "SELECT * FROM $table_name WHERE cid=3D'$ucid' AND pin =3D
'$upin' ";
>
>THAN
>
>$sql =3D "SELECT * FROM $table_name WHERE cid=3D\"$ucid\" AND pin =3D
\"$upin\" ";
No diffrence in speed...
> I have heard that it takes more time to parse through double quotes.
Yep. PHP doesn't parse through ''. So the fastest way in this case is:
$sql =3D 'SELECT * FROM '.$table_name.' WHERE cid=3D"'.$ucid.'" AND pin
=3D "'.$upin.'" ';
Second. Why don't you use printf instead of print? A lot nicer format of
the strng. Although I would have used ?> <html strings here> <?. Makes
the code a lot easier to read.
-----Ursprungligt meddelande-----
Fr=E5n: Kyle Ketterer [mailto:bige88fan@c...]
Skickat: den 30 oktober 2002 03:35
Till: professional php
=C4mne: [pro_php] Re: Values not showing up.
Well just for the heck of it, I believe it's better to use:
$sql =3D "SELECT * FROM $table_name WHERE cid=3D'$ucid' AND pin =3D
'$upin' ";
THAN
$sql =3D "SELECT * FROM $table_name WHERE cid=3D\"$ucid\" AND pin =3D
\"$upin\" ";
I have heard that it takes more time to parse through double quotes.
And also, in your IF statements, the reason it may be being looked over
is because you have integers nested in double quotes, which is
unneccessary.
Instead of this for instance:
if ($barge =3D=3D "1") {
blablabla...
}
Try:
if($barge =3D=3D 1){
blablabla...
}
I also noticed that in a couple of your IF's you only have a singular
'=3D', I believe you should use =3D=3D in most cases.
Hope this does something:)
-Kyle.