Sigh - More Bad Code
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!
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