Jump to content

Simple Query


ameliabob

Recommended Posts

I have been looking at this for a couple of days and cannot figure out what I am doing wrong. Hopefully another set of eyes will help. I am trying to send this query: SELECT symbol,stockName, buysell FROM followlist WHERE symbol = 'DHI' as $result = mysql_query("SELECT symbol,stockName, buysell FROM followlist WHERE symbol = 'DHI' ") or die(mysql_error()); and get this message back. SELECT symbol,stockName, buysell FROM followlist WHERE symbol = 'DHI' didn't take: Unknown column 'dhi' in 'where clause' I know that dhi is not a column but "symbol" is a column. What am I not seeing

Link to comment
Share on other sites

rename it to dbsymbol it may work.Sometimes sql thinks you meaning a tag instead of a (what you want)Like this:SELECT select,where,group FROM where WHERE group=order by Sql can't handle this 2x select , 2x where you see the problem?

Link to comment
Share on other sites

I tryed query this worked.

SELECT symbol,stockname,buysell FROM followlist WHERE symbol = 'DHI';

It checked 'DHI' from symbol column, works for me all i require is table where is these columns (symbol, stockname & buysell)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...