mysql_select_db() and mysql_query()
| From: | Dan Martin | Date: | Fri, 29 Nov 2002 20:20:22 +0000 |
| Subject: | mysql_select_db() and mysql_query() | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-23739@lists.php.net to get a copy of this message | ||
A friendly error message advised me that "mysql_db_query" is deprecated and
to use "mysql_select_db() and
mysql_query()". but I can't seem to get past this return in the Browser:
"Parse error: parse error in c:\program files\apache
group\apache\htdocs\crup_hs_local\result.php on line 58". I think I don't
understand the basic syntax.
/*$result = mysql_db_query($dbname,$sql);*/
/*mysql_db_query is deprecated; use mysql_select_db() and mysql_query()*/
$result = mysql_select_db($dbname) or die(mysql_error();
$result = mysql_query($sql);
$numrows = mysql_num_rows($result);
I've search my references and the PHP Manual, but can't seem to figure this
out. I'd be grateful for a reference or guidance.
Thanks,
Dan