The following is a select statement i am struggling with:
Language: sql (GeSHi-highlighted)
$query = "SELECT '$transtype' FROM chargestable WHERE tramount = '$tramount'";
'$transtype is a variable which can hold values
cash or
bank or
cheque. The values are also the same as their corresponding column names in the table.
When i perform the query, it returns the name of the column instead of the value stored in the column.
I'll appreciate some help please.
Thnx