Hey I'll even put in a custom function!
$this->load_class( 'DB', 'Kernel' );

Hey I'll even put in a custom function!
$this->load_class( 'DB', 'Kernel' );
visit my internet web site on the internet
http://dong.engineer/
it is just videos by bill wurtz videos you have been warned
Wait.. So your saying my mysql could be better?orPHP Code:<?PHP
$knownSinner = mysql_query("SELECT * FROM `idiotlist` WHERE `username` = 'knownSinner'");
if(mysql_num_rows($knownSinner) == 0) {
print "You are only lying to yourself...";
} elseif(mysql_num_rows($knownSinner) > 0) {
print "Thats what i thought.";
}
?>
PHP Code:<?PHP
$knownSinner = mysql_query("SELECT * FROM `idiotlist` WHERE `username` = 'knownSinner'");
$n = mysql_num_rows($knownSinner);
if($n == 0) {
print "You are only lying to yourself...";
} elseif($n > 0) {
print "Thats what i thought.";
}
?>
Im very confused..
Doing if(mysql_num_rows($knownSinner)){ is a longer way of counting the rows...
the second one you have done almost exactly the same except added if($n >0).
There was no need for an elseif as else works just fine.
whats the point though in using another if statement when you can use the one your alread y using?
Hi, names James. I am a web developer.
I don't see the point in brackets either... unless you are doing functions as in, or headers etc....
function whatever($echo)
ohhhh http://www.php.net/quickref.php
PM ME FOR QUICK HELP ON WEBDESIGNING, CODING, AND COMPUTER PROBLEMS! I WILL BE GLAD TO HELP FOR FREE!
I AM A GOLD HC MEMBER! 16 MONTHS! I have been on Habbo since the layout with the Newsie, and 14 of my articles were posted! I'm trusted when trading HC stuff for coding!
Noob person (this is true):da hotel manager getz paid 20 credz ay day n habbo staff clik a button n furni chang color
PHP Code:<?php
echo("I actually think it's much neater and clearer by having it with brackets surrounding the speech marks but that's just my personal opinion.");
?>
Last edited by --ss--; 06-05-2008 at 07:31 PM.
I agree to that![]()
Hi, names James. I am a web developer.
if($x == 0) {
// error
} elseif($x > 0) {
//succeed
} else {
// error
}
apposed to
if($x == 0) {
// fail
} else {
if($x > 0) {
// succeed
} else {
// fail
}
}
Hi, names James. I am a web developer.
visit my internet web site on the internet
http://dong.engineer/
it is just videos by bill wurtz videos you have been warned
Want to hide these adverts? Register an account for free!