January 8th, 2009


Sigh - More Bad Code

Filed under: Rant, Web Dev — Will Boyce on April 25th, 2007 @ 10:25

So, I was looking through some code today [at work] and I found this:

$sql = "SELECT cMobile,bActive FROM clampers";
$db->query($sql);
$cMessage ="GROUP TEXT: ".$cMessage;
while ($db->next_record())
{
	$cMobile =$db->f('cMobile');
	if ($db->f('bActive')==1){
		$result = sendSMS($cMobile,$cMessage);
		LogSMS($receiver,$cMobile,$cMessage,$result,$cSender);
	}
}

I mean.. What’s wrong with ‘SELECT cMobile FROM clampers WHERE bActive=1′? Sigh, I dunno what the world is coming to but Greg Stanton; you cannot code… ‘Grats!


1 Comment »

  1. SELECT Bakery.Donuts, Cow.Custard FROM Tescos Bakery
    WHERE Bakery.AddedSugar = ‘True’
    INNER JOIN Dairy Cow
    ON Bakery.Dough = Cow.Udder
    AND Cow.Name = ‘Daisy’
    AND Cow.Steak = ‘Juicy’

    Comment by JonB — April 25th, 2007 @ 10:55

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>