[PHP]Help.. again.. ;[

Status
Not open for further replies.

Dzetki

The Prodigal Son Returns
Jul 16, 2010
990
220
Well, i've been trying all day to figure out something, but it just won't work. I want to do so that $sitename fetches the information from my database and gets the table "sitename". I use the following code:
Code:
$sitename = mysql_query('SELECT sitename FROM site_config');
The only thing i get is "Resource id #5" which is far from what the sitename where. I also have a database connection to fill it completely up, but that didn't help either. What do i have to do? Or what may i have done wrong? I do not want something like $row['sitename']; etc. I just want to put up $sitename as it's way easier and faster to insert.

Halp? ;[
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,195
3,906
I was doing something along the same lines, but here is what should work:

<?php

$siteshit = mysql_query('SELECT * FROM site_config');


$row = mysql_fetch_array($siteshit);

$sitename = $row['sitename'];

?>

Should work!
 
Status
Not open for further replies.

Users who are viewing this thread

Top