Changed thread title to better describe the problem.
Heya, kavithadevan.
Code Green was being facetious. He was implying that you could stop by TheScripts every day, and we'll supply you with a new proverb!
You have a couple of options. These are the two easiest ways that don't require scheduling scripts:
- You can display a random proverb every time the User loads the page. This is the easiest way to do it.
-
SELECT
-
*
-
FROM
-
`Data_Proverbs`
-
ORDER BY
-
RAND()
-
LIMIT 1
- You can display a different proverb depending on what day of the year it is. This is slightly more difficult, but still pretty easy.
-
$sql = '
-
SELECT
-
*
-
FROM
-
`Data_Proverbs`
-
WHERE
-
`proverbid` = \'' . (date('z') % 365) . '\'
-
LIMIT 1';
-