Sending SQL Queries to a MySQL Database using the mysql_query () function : Database Query : MySQL Database PHP Source Code


PHP Source Code » MySQL Database » Database Query »

 

Sending SQL Queries to a MySQL Database using the mysql_query () function



<?php
  $host="mysql153.secureserver.net";
  $uname="navioo";
  $pass="password";
  $database="navioo";
  
  $connection= mysql_connect ($host, $uname, $passor die ("Database connection failed!");

  $result=mysql_select_db ($databaseor die ("Database could not be selected");
  $query = "drop table if exists mytable";

  $result = mysql_query ($queryor die ("Query failed.");
?>

           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo MySQL Database
» Database Query