Ask about general coding issues or problems here.
Moderators: macek, egami, gesf
- New php-forum User
- Posts: 9
- Joined: Sun Jun 24, 2012 4:32 pm
- Location: Chennai India
can you check whether
Code: Select all
SELECT price FROM sh_chart WHERE price<10.00 ORDER BY DESC
works in an SQL prompt (like phpmyadmin etc)
- php-forum Fan User
- Posts: 973
- Joined: Mon Oct 01, 2012 12:32 pm
A failed query (results in error) returns false. That could be because the connection failed, a column or table name is misspelled, etc. If you're not seeing sql error text on your screen, view source on the page that is returning that error and you should see the SQL error embedded inside of a tag. it will give you a better idea of what is actually wrong. Or just take the query as chrisranjana said and run it in mysql or phpmyadmin to get the error directly without having to view source. That will work for field or table level errors.
Who is online
Users browsing this forum: Baidu [Spider] and 3 guests