[CS-FSLUG] php sql question

sjm sjm.mlists at gmail.com
Wed Dec 16 22:30:53 CST 2009


>> some code (pasted below) that I have been experimenting with, but for 
>> the life of me, I can't think of a way to get the row to stick when 
>> the browser is refreshed.  
 >> ...
>> browser. If I try and use the exit; function then the rest of the page 
>> is cut short and none of the php code is executed below the exit; 
>> function....

>> Would anyone by any chance have an idea?

As Frank said, you need to limit the call to rand().  Another approach 
may be to do it outside of php & mysql.  You can run a script from cron 
once a month that writes to a file > monthly_photo_index and just read 
that file from within php to select the photo.  (This is from someone 
who doesn't do much php or sql, so take it for what it is worth.)

sjm


__________ Information from ESET NOD32 Antivirus, version of virus signature database 4694 (20091216) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com






More information about the Christiansource mailing list