Z góry mówię, że jestem big lame w php i proszę o łagodny wymiar kary :).
[code]<html>
<head> <title>Pobieranie danych z MySQL</title> </head> <body> <?php$aDBLink = @mysql_connect( localhost, "sodax_test", "test" );
if ( mysql_select_db( "sodax_test", $aDBLink ) == True )
{
echo("connect ok");
}
echo("<br>witaj!<br><br>");
$aSQL = "select * from table";
$aQResult = mysql_query( $aSQL, $aDBLink );
if ( $aQResult == True )
{
echo("select ok
");
}
else
{
echo("select error
");
}
while ( $aRow = mysql_fetch_array( $aQResult ) )
{
echo( "$aRow<br>" );
}
mysql_free_result( $aQResult );
?>
</body> </html> [/code]co jest źle :(?
pojawia się błąd:
connect ok
witaj!
select error
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/sodax/domains/domena_serwera/public_html/index.php on line 32
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/sodax/domains/domena_serwera/public_html/index.php on line 36