php error

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 9
Joined: Sun Jun 24, 2012 4:32 pm
Location: Chennai India

Sun Mar 03, 2013 9:06 pm

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
php-forum Fan User
Posts: 974
Joined: Mon Oct 01, 2012 12:32 pm

Mon Mar 04, 2013 10:26 am

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.

Post Reply