need help some noob problems
Posted: Sun Feb 19, 2012 4:43 am
so i open new db with only 1 table and 2 columns.
column : id + name
this is the php code i weite:
the problem:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/alex/public_html/index.php on line 10
line 10 is: while($myrow = mysql_fetch_array($result));
i try not writing this.
but this gave me the same results
what to do?
column : id + name
this is the php code i weite:
Code: Select all
<?php
$db = mysql_connect("localhost","alex_123","1234512345");
mysql_select_db("a", $db);
$result = mysql_query("select * from a", $db);
while($myrow = mysql_fetch_array($result));
{
echo $myrow['name'];
}
?>Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/alex/public_html/index.php on line 10
line 10 is: while($myrow = mysql_fetch_array($result));
i try not writing this.
but this gave me the same results
what to do?