note 14383 deleted from function.mysql-select-db by betz

From: Date: Sat, 10 Aug 2002 17:27:04 +0000
Subject: note 14383 deleted from function.mysql-select-db by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-34774@lists.php.net to get a copy of this message
$db_name = "database"; $table_name = "sourcecodetable"; $link = mysql_connect("localhost", "username", "password") or die("Could not connect to server!"); $select_db = mysql_select_db($db_name, $link); $mymonth = date("m"); $myday = date("d"); $myyear = date("Y"); $myday = $myday - 03; $search_date = $mymonth . "/" . $myday . "/" . $myyear; $query = "SELECT * FROM $table_name WHERE date_entered >= '$search_date' ORDER BY category"; $result = mysql_query($query, $link) or die("Could not complete database query"); $num = mysql_num_rows($result);

« previous php.notes (#34774) next »