Jump to content

Simple Query


ameliabob
 Share

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...