[ Gajacomputers @ 19.08.2005. 09:05 ] @
E pa ovako stoje stvari Instalirao sam Apache 2.0.54 Win32 PHP mislim da je 4.4 win32-bez instalera , MySQL 4.0.25 .Php radi testirao sam ga ali SQL nece 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 :) |