making queries from a db in a hosting space hosted by DirectAdmin should be the same as other control panels, but I want to ask if you have ever faced such situation or not:
I made a new database and a new table using directAdmin->phpMyAdmin
In my script, the connection string works fine, but the query gives warning:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in .../popup_score.php on line 46
$con = mysql_connect("localhost","db_username","db_password");
$db=mysql_select_db ("db_name", $con);
$result = mysql_query("SELECT * FROM table1"); //line 45
echo $row = count(mysql_fetch_array($result)); //line 46
as you see, the query in line 45 is not being executed.
the sample db has one table called table1.
table1 has one column called id.
the table has 2 or 3 records.
queries from phpMyAdmin panel will be executed, but not within the program.
it may be hard to say somthing about, but if somebody has experienced the same case, could be helpful to me.
thanks.