[thelist] The document contained no data

Poojie poojie at dccnet.com
Tue Jul 10 12:37:21 CDT 2001


Cripes!! Finally I have found someone else that has this same
problem.

My site runs on Perlscript ASP and MySQL and I had almost the exact
same problem, except my pages would remain "blank" until I modifed
the offending file via FTP (rename it and name it back again,
upload the file again, etc -- the net change was nil but I just had
to do something to the file). It seems that the process for a
specific page would get "stuck", if that makes and sense at all.
And for whatever reason this only happens on the production server
and not mine.

What version of MySQL are you using? Is it the same at home and on
the web server? The offending version of MySQL that I am using is
3.22.32-beta . I have roughly narrowed down the problem to this: I
have several function within my site that require the selection of
random records in the database. I used to generate a random number
in perl within the range of record IDs and then SELECT the record
with that number. It appears as though the "blank" page thing would
hapen when a record was called that didn't exist (for whatever
reason -- possibly a bug in this version of mysql). You would
think, though, that the query would just return 0 results.

I tried quite a number of "fixes", but the one that seemes to be
holding together the longest is using the MySQL function RAND()
instead of generating the random number in Perl. A query looks like
this: SELECT field FROM table ORDER BY RAND() LIMIT 1. So far it
has been 2 weeks with no problems which is the longest it has gone
before. I have my fingies crossed.

Does this help?

Daryl








More information about the thelist mailing list