Re: How to change pictures everyday using php



On Sun, 29 May 2005 18:44:46 GMT, "Luigi Donatello Asero"
<jaggillarfotboll@xxxxxxxxx> wrote:

>I am wondering how I could let change pictures on a page automatically
>everyday.
>May-be I could
>1) insert the photos in a database
>2) call the photo from the database to the page with an if-clause which
>depends on the date?
To give you a random piccy every time the file is called -
Select piccy from piccy_table order by rand() limit1

The following is not tested, but I would be looking at doing something
like...
if you have a need for just 7 piccies, just let your script decide which day
it is and then
switch ($day)
{
case=Monday:
$piccy_filename=monday_piccy_filename;
break;
etc
etc
}
select piccy from piccy_table where piccy filename = $piccy_filename;
If you're aiming at 31 for the month, or 366 for the year, I suppose the
same sort'v thing would work.
.



Relevant Pages

  • How to change pictures everyday using php
    ... I am wondering how I could let change pictures on a page automatically ... insert the photos in a database ... Prev by Date: ...
    (alt.php)
  • Re: How to change pictures everyday using php
    ... >I am wondering how I could let change pictures on a page automatically ... >1) insert the photos in a database ... Prev by Date: ...
    (alt.php)
  • Re: Simple replication situation/question
    ... When I was first faced with email this 36M database, ... > - store a global variable that designates a root folder for your ... >>Yes, there are photos, but no, they are not stored in the database. ...
    (microsoft.public.access.replication)
  • Re: Simple replication situation/question
    ... I did an X-ref listing of the database objects using Rick Fisher's "Find ... There is still a problem in my Reports 'module'. ... I haven't done the splitting yet; I wanted to get the junk out first. ... >>Yes, there are photos, but no, they are not stored in the database. ...
    (microsoft.public.access.replication)
  • Re: Simple replication situation/question
    ... Yes, there are photos, but no, they are not stored in the database. ... > computer identically and creating identical folder structures on each ... To do any kind of replication other than within a LAN, ...
    (microsoft.public.access.replication)