msql_query() sends a query to the currently
active database on the server that's associated with the
specified link identifier. If the link identifier isn't
specified, the last opened link is assumed. If no link is open,
the function tries to establish a link as if
msql_connect() was called, and use it.
Returns a positive mSQL query identifier on success, or FALSE on
error.
Example 1. msql_query() example
<?php $link = msql_connect("dbserver") or die("unable to connect to msql server: " . msql_error()); msql_select_db("db", $link) or die("unable to select database 'db': " . msql_error());
$result = msql_query("SELECT * FROM table WHERE id=1", $link); if (!$result) { die("query failed: " . msql_error()); }
while ($row = msql_fetch_array($result)) { echo $row["id"]; } ?>
msql query php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online
Php msql query syntax tutorial
php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.