kada pokrenem php sa ovim kodom
<pre>
<h3>Press RELOAD to add a record to the MySQL database:</h3>
<?
//establish user connection
mysql_connect("localhost");
//open up database
mysql_create_db("testdatabase");
mysql_select_db("testdatabase");
//create table
mysql_query("CREATE TABLE newone(firstName VARCHAR(25), lastName VARCHAR(25))");
mysql_query ("INSERT INTO newone (firstName, lastName) VALUES ('John', 'Tester')");
//display the information
$result = mysql_query ("SELECT * FROM newone");
while($row = mysql_fetch_array($result))
{
print ("Added record: " . $row["firstName"]." ".$row["lastName"]."<br>\n");
}
//close user connection
mysql_close();
?>
</pre>
#on mi ispishe Press RELOAD to add a record to the MySQL database:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in D:\phpweb\testsql.php on line 14
Unapred zahvalan :)