Home about IT Motivation Course Sales Project About Me

Saturday, May 09, 2009

mysql_num_rows(): supplied argument is not a valid MySQL result resource in

if you have error message as above at your web php script, please add below script for know the cause of the error:

$tampil="select * from table ";
$hasil=mysql_query($tampil) or die (mysql_error());
$jumlah=mysql_num_rows($hasil);


import data to MySQL 5.0.45

please do below steps:
  • save the excel data to csv format and no need additional character between each column.
  • open the csv file use notepad to make sure that each column separate by , (koma).
  • at the AppServ, open the phpMyAdmin and select the database
  • then open the table at the menu and select structure mode
  • then select import menu then browse the csv file
  • then select format file csv then select
  • fields terminated by : , (koma)
  • fields enclosed by : , (koma)