I would now run the SQL statement that phpMyAdmin produces with the Perl code.
I would also run the select count(*) from ... where ... statement, to see what the database thinks how many rows there would be.
| [reply] [d/l] |
I crafted the SQL in PHPAdmin to get what I wanted from the table, tuning it until I was happy with the results. Then I ported it to PERL but simply copying it to the source and plugging in the variable to let me specify the search words when the program ran.
By this technique, I could see what results I expected when the PERL program ran. I will try the COUNT(*) and see what MySQL says.
Dave
| [reply] |
| [reply] |
Then I would really, really make sure that the two programs are connecting to the same database indeed. Consider using the mysql command line program to cross-check the results.
If MySQL tells Perl that there is only one row, and Perl only returns one row, the two are consistent. If MySQL tells Perl one thing and PHP another thing, I highly doubt that the two are talking to the same database instance.
| [reply] [d/l] |