I'm using this script for connect to a mysql database but it only works in
php3 not in php4, any ideas?
$servidor = "localhost";
$usuario  = "user";
$clave    = "pass";
$base     = "database";

$id       = mysql_connect($servidor,$usuario,$clave);
$conexion = mysql_select_db($base, $id);
$consulta = "SELECT * FROM Recursos";
$res      = mysql_query($consulta,$conexion);
$numero = mysql_num_rows($res);
return $numero;
In php3 returns the number of fields, but in php4 get the followings errors
Warning: Supplied argument is not a valid MySQL-Link resource
Warning: Supplied argument is not a valid MySQL result resource

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to