Pre Exam Test Practice (SSC | Banking | IAS | GATE | State Level | CLAT | Railways | Insurance | Teaching Exams | NDA | Defence | IES |State Exam )

Organizational Research By

Surprising Reserch Topic

why does this return resource id 2

why does this return resource id 2  using -'php,sql,mysql'

  Possible Duplicate:
  How do i “echo” a “Resource id #6” from a MySql response in PHP?  

I am new at php and SQL and I'm trying to make the php page list the numbers of enries in the table.
I'm using this code but it returns Resource id #2:

$rt=mysql_query("SELECT COUNT(*) FROM persons");
echo mysql_error();
echo "<h1>Number:</h1>".$rt;


asked Oct 7, 2015 by mca.agarwal
0 votes

Related Hot Questions

Government Jobs Opening