PHP ODBC comparison operators

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
shaneshack
Forum Newbie
Posts: 7
Joined: Tue May 22, 2007 2:50 pm
Location: Sterling, CO

PHP ODBC comparison operators

Post by shaneshack »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


I have a comma separated file that I am using as an ODBC System DSN (Windows 2003 Server).  It's working great except for the following:

Code: Select all

$sql = "SELECT * from database.csv where sellingprice <= '10000' order by make, year";
This line of code returns no results, and I know there are values for this field which are <= 10000 in the database. So then I tried:

Code: Select all

$sql = "SELECT * from database.csv where sellingprice < '10000' order by make, year";
This doesn't work either; returns no results. Finally I tried:

Code: Select all

$sql = "SELECT * from database.csv where sellingprice = '10000' order by make, year";
This works perfectly.

Any suggestions for what I should do?


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Post Reply