Hi Dan,

On Sun, 2004-01-04 at 03:34, dan wrote:
> I have an SQL statement as follows,
> SELECT * FROM memodata WHERE to=1 AND readdate=sent ORDER BY id ASC
> which fails giving an error on the to=1 part.
> I've tried doing that statement without the 'to=1 AND' part, and it works
> fine returning all and more of the data that I want. However when i ask it
> to be more specific, it fails. I've also tried
> SELECT * FROM memodata WHERE to=1
> which also fails on the to=1 part. I've also tried putting in other column
> names, like from=1, but that fails too. And I'm totally clueless as to why,
> as the syntax follows the manual on mysql.com exactly.
> Any pointers as to where I'm going wrong?

just wildly speculating, but I'd guess that "to" and "from" are typical
string values (and not integers) - have you tried something like

        SELECT * FROM memodata WHERE to = '1'

BTW: You can find out the column types by typing "describe memodata;" on
your mysql command line.

HTH,

Philipp


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to