Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online

msql query function syntax tag tutorial 2013 Donate at flattr Flattr this

Alert! Connect with 10,000 Chating Online. Join Now

Php msql query () function

Write your php code

<?php ?>

Php Result

Your code below

(PHP 3, PHP 4 , PHP 5)

msql_query -- Send mSQL query


resource msql_query ( string query [, resource link_identifier] )

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

= 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) {
"query failed: " . msql_error());

while (
$row = msql_fetch_array($result)) {

See also msql_db_query(), msql_select_db(), and msql_connect().

Php msql query Function syntax tag

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.

Function index







Date & Time

Directory function




Form data handling

Mathematics operators


Php Mysql

Network Functions


php tutorial guides,functions, classes, code examples and tags for creating simple dynamic site to mysql database driven sites
Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online