• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

about print

rotan

New Member
please help me that how i can print the select result on my server.
my os is linux and database is mysql.:confused:
 
PHP?

Depends, if it is one result, you can go

Code:
$query = mysql_query("SELECT * FROM table WHERE sum='1'");
$result = mysql_fetch_array($query);
print "Sum: ".$result[sum]."<br>";

But if it's more then one result, like search results, then something like this:

Code:
$query = mysql_query("SELECT * FROM table WHERE category='ya'");

while($result = mysql_fetch_array($query))     {
     print "Title: ".$result[title]."<br>";
     print "Description: ".$result[description]."<br>";
}

Assuming the propper table structure. :)
 
Back
Top