Online Shopping : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

23 of 29 people (79%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

Mysql: fetch and print the value of a single cell

Nov 28th, 2008 00:30
healthy man, dman, Matt Rudderham, mr fitz,


Connect to the Mysql Server and select the database:
$db = mysql_connect("localhost", "User", "Password");
   mysql_select_db("DatabaseName",$db);
Run a query:
$SQL="SELECT * FROM MEMBERS";
$RESULT=mysql_query($SQL);
-->Get the result:
$myrow=mysql_fetch_array($RESULT);
Display it:
echo $myrow["Cellname"];
-->
Put the stuff in between the --> to display all the results if multiple.
- Matt
http://www.healthdothealth.com
http://www.healthxhealth.com
http://www.mesotheliomainmesothelioma.com
http://www.healthfirewall.com
http://www.flathealth.com
http://www.healthbodyguard.com