Jump to content

up2trouble

New Members
  • Posts

    2
  • Joined

  • Last visited

up2trouble's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Upgrade to what version? How would this be done in mysqli? //******************************** $db_table = "quotes"; //******************************** $connection = mysql_connect($db_host,$db_user,$db_pass) OR DIE ('I can not connect to the server because:' . mysql_error()); mysql_select_db($db_name, $connection) or die ('I can not select the database because:' . mysql_error()); $num = mysql_query("SELECT COUNT * FROM $db_table"); $result = mysql_query("SELECT * FROM $db_table ORDER BY RAND($num) LIMIT 1"); $row = mysql_fetch_array($result); echo "<font size='10'> {$row['quote']}</font><BR><BR>"; echo "<font size='7'><i>{$row['author']}</i></font>"; ?> ?>
  2. $db_table = "quotes"; //******************************** $connection = mysql_connect($db_host,$db_user,$db_pass) OR DIE ('I can not connect to the server because:' . mysql_error()); mysql_select_db($db_name, $connection) or die ('I can not select the database because:' . mysql_error()); $num = mysql_query("SELECT COUNT * FROM $db_table"); $result = mysql_query("SELECT * FROM $db_table ORDER BY RAND($num) LIMIT 1"); $row = mysql_fetch_array($result); echo "<font size='10'> {$row['quote']}</font><BR><BR>"; echo "<font size='7'><i>{$row['author']}</i></font>"; ?> ?> errors Warning: mysql_fetch_array() [function.mysql-fetch-array]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/justmason/public_html/quotes/quotes.php on line 15 Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/justmason/public_html/quotes/quotes.php on line 15
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.