View Single Post
Old 03-30-2007, 10:21 AM   #13 (permalink)
elderec
Administrator
 
elderec's Avatar
 
Join Date: Dec 2004
Posts: 38
+0 Internets
After you connect to the database server, you need to select the database you wish to work with before attempting to insert into it.

Code:
$jl = mysql_connect('hostname', 'username', 'password') or die('Could not connect: ' . mysql_error()); mysql_select_db("database",$jl) or die(mysql_error()); $sql = 'INSERT INTO simple VALUES ('Bah')'; mysql_query($sql); mysql_close($jl);
__________________
Site Administrator
Uberguilds.org
elderec is offline   Reply With Quote

 
Uberguilds Network