Why is my mysql_fetch_array () statement not output properly?
$conn = @mysql_connect ("localhost", "root", "") or Die ("link error");
mysql_select_db ("newdb", $conn);
$sql = "Selete * from Test";
$query =mysql_query ($sql, $conn);
$array =mysql_fetch_array ($query);
Print_r ($array);
?>
Warning:mysql_fetch_array (): supplied argument is not a valid MySQL result resource in D:\WAMP5\wamp\www\test\file.php on Line 6
MySQL PHP
------Solution--------------------
$sql = " SELECT* FROM Test ";
------Solution--------------------
supplied argument is not a valid MySQL result resource parameter not a MySQL results resource
That's the problem with your SQL statement execution.
------Solution--------------------
Selete * FROM Test
Switch
SELECT * FROM Test
------Solution--------------------
Coding is not uniform, what is your table code plus
mysql_query ("Set Name Your code");
and the browser encoding should be consistent.