Oh gosh this is embarassing. For like 6 years my test site and production site were accessing the same database so I could test with the same data set. I forgot a couple months ago when I was doing a bunch of data conversion I separated it into a test and production DB. I forgot to change the...
Crap, I've got some weird stuff going on I've never noticed before. I created a more simple statement:
SELECT brand,name,collection,dept FROM models2 WHERE top != ''
In Perl I get 40 records, in PHPMyAdmin I get 69. There's actually 69 matching records if I examine all of them. Wondering...
I even tried removing LIMIT 5 to see if that makes a difference and it doesn't. I can only get results if I remove the top != ''
Interestingly if I remove the top != '' and the LIMIT 5, the Perl script produces 133 records and the direct call via PHPMyAdmin results in only 130 records...
That was an earlier misprint of the code. Sorry. This is the code:
$model_exclude = "and name != 'bozo'";
$dept = 'LEATH';
$model = 'home';
$sql_stmt = "SELECT brand,name,collection,dept FROM models2 WHERE status < 8 and top != ''".$model_exclude;
$sql_stmt.= " and dept = '$dept'" if...
If I remove the top <> '' filter from the sql statement I get 5 results back, but that's because only about 10 records that match have top <> '' and if I take that out, about 600 records match. Top is char[1] field type and the value is either nothing '' or 'Y' For some reason when executed...
I've got a Perl program that is returning an incomplete result set. I can output the mySQL call that Perl is executing. In the perl program it gets less records back than if I copy and paste the statement into phpMyAdmin and execute it.
Statement Example:
SELECT brand,name,collection,dept FROM...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.