Recursion
16-05-2010, 01:59 PM
Hey,
I'm a total n00b with PHP/MySQL and I'm learning so;
How do I grab the data from a MySQL table? I have a table called siteconfig and in there I want to grab the single result from sitename.
Now, I did:
$sitenquery = "SELECT sitename FROM siteconfig";
$sitendb = mysql_query($sitenquery);
$sitename = mysql_result($sitendb);
and then:
<title><?php echo($sitename); ?></title>
But it doesn't work?
Sorry if this is a stupid question but I am still learning! :(
I'm a total n00b with PHP/MySQL and I'm learning so;
How do I grab the data from a MySQL table? I have a table called siteconfig and in there I want to grab the single result from sitename.
Now, I did:
$sitenquery = "SELECT sitename FROM siteconfig";
$sitendb = mysql_query($sitenquery);
$sitename = mysql_result($sitendb);
and then:
<title><?php echo($sitename); ?></title>
But it doesn't work?
Sorry if this is a stupid question but I am still learning! :(