I am having difficulties with a MYSQl select statement. Is it possible to return a value where the right value's match. eg. I have a table.
id | 1 | 2 | 3 | etc. <--- COLUMNS
1 | Value | Value | Value | etc.
2 | Value | Value | etc..
3 | Value | Value |
4 | Value | Value |
5 | Value | Value | etc...
Im am trying through php to query the database to return value with.
$id = 3;
$inputvalues = "SELECT 'column'
FROM `DB`
WHERE `id` = $id
";
$return = mysql_query($inputvalues, $connection);
while ($r = mysql_fetch_array($return)){
$r[0];
echo "$loc = $row[3]<br />";
I think in theory this should work however all the returned value's come back empty?
Is this possible?