Hi I have been struggling with this query for a while now

I need to get the number of rows inserted into my database table, but I keep getting this error I can't seem to get rid of.

$result3=mysql_query("INSERT INTO dest_table.create_info SELECT * from 
Profusion.source_cdr");
$num_rows = array($result3);
$progress=mysql_num_rows($num_rows);
echo $progress;

The error I get is

mysql_num_rows() expects parameter 1 to be resource, array given

It will be highly appreciated if I get this resolved

Use mysql_affected_rows() instead of mysql_num_rows($num_rows). Also use MySQLi or PDO libraries, since the MySQL library is going to be removed.

Docs: http://php.net/mysql_affected_rows

Thanks cereal I finally figured it out, your help is much appreciated.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.