Discussion Locked

PHP & MySQL Query

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

The printf statement in below code alway returns 0 even though the SQL when run directly on the MySQL return more then 1 row.

Pls. can anyone correct me if I'am doing anything wrong.

Thanks

function query($query)
{
$connection = mysql_connect($this->hostname, $this->db_login, $this->login_pw)
$get_data = mysql_db_query($this->db, $query, $connection);

printf (count($get_data));
return $get_data;
} //-> End query

3 replies

This discussion is closed to new replies.