thats is correct
echo $row["name"];
returns a whole range of game names from my database but
echo $custom[0]->value;
returns only what the article writer has typed to be the 'related game' to the article on my site.
I need to fetch the information from my database about the 'related game' based on what ever string
$custom[0]->value;
outputs.
if I echo them alone to display the value they both work but if I use the (i think its called an array but im new to php so not too sure) $custom[0]->value; as WHERE like so;
// fetch the value of field called Game
//connect to database
$database =& JFactory::getDBO();
$query = "SELECT name, id, avatar FROM jos_games WHERE name = '$custom[0]->value'"; //should SELECT name, id and avatar WHERE name = Trine 2
then WHERE name = '$custom[0]->value' will not fetch Trine 2 even though $custom[0]->value echos (orreturns) 'Trine 2'.
I am so confused argh lol