[CS-FSLUG] php sql question

David McGlone david at dmcentral.net
Thu Dec 17 17:29:30 CST 2009


On Wednesday 16 December 2009 23:30:53 sjm wrote:
> >> 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.)

That is an excellent option also. I've been grinding my nose it learning as 
much PHP and MySQL as I possibly can for like the past year that I forgot that 
there are other things that would also work and your advise actually made me 
realize just how boxed in my mind has been working lately.

I really really have my heart set on becoming an excellent php programmer.

-- 
Blessings
David M.
I have been driven to my knees many times by the overwhelming conviction that 
I had nowhere else to go.




More information about the Christiansource mailing list