PHP Select

Status
Not open for further replies.

GarettM

Posting Freak
Aug 5, 2010
833
136
Ok imma Noob so what :( my dream is to build a functional PHP site ;D Ill do it one day!!!
Heres My PHP Code....
$sql = "SELECT `content` FROM `system` WHERE tag = sitename LIMIT 1 ";
SQL:

id = 1,
tag =
sitename
content = Fame
id | tag: | content:
1 | sitename | Fame

How Can I Get The Text Fame out with PHP?? Thats All i want D:
Can any one help?
 

Muffins

Member
May 12, 2012
18
0
First off...
use
$sql = mysql_query("SELECT `content` FROM `system` WHERE tag = sitename LIMIT 1 ");
$data = mysql_fetch_array($sql);
echo $data['0'];
 

Tranquilizer

Active Member
Jan 24, 2012
164
16
$sql = mysql_query("SELECT * FROM system WHERE tag = 'sitename' LIMIT 1 ");
$data = mysql_fetch_array($sql);
echo $data['content'];

This should do the trick.
 
Status
Not open for further replies.

Users who are viewing this thread

Top