mysql_db_query.php : mysql_db_query « MySQL Database « PHP






mysql_db_query.php

 
<?php
   $linkID = @mysql_connect("localhost","root","") or die("Could not connect to MySQL server");

   $query = "INSERT INTO mytable set id='0', title='pants', myvalue='4'";
   $result = mysql_db_query("mydatabase", $query);

   mysql_close();
?>
  
  








Related examples in the same category

1.Insert data to mysql table