Forums
This topic is locked
Query help with mySQL
Posted 10 Dec 2001 05:26:38
1
has voted
10 Dec 2001 05:26:38 Bobby Jenkins posted:
I'm trying to build a simple query in UD with the PHakt extension.It is as follows:
select * from tblTest where field.x is not null
How do I get mySQL to disregard the null entries in that field?! I still get everything pulled from the database. The SQL statement works fine with ASP. What am I doing wrong???
Thanks,
Bobby
I'm Beginning to See the Light
Replies
Replied 10 Dec 2001 06:01:57
10 Dec 2001 06:01:57 Bobby Jenkins replied:
OK,
I finally figured out to exclude fields with no data. However, when I try to preview the page in the browser, I get a big fat error:
Parse error: parse error in c:\program files\apache group\apache\htdocs\women\tmp7zrs6o4323.php on line 10
Here's the code:
("SELECT * FROM Contacts WHERE FirstName Not Like "" ORDER BY FirstName;"
I imagine it has something to do with the double quotation marks, but I can't figure it out. It works fine when you test the SQL statement.
Help!!!
Bobby
I'm Beginning to See the Light
I finally figured out to exclude fields with no data. However, when I try to preview the page in the browser, I get a big fat error:
Parse error: parse error in c:\program files\apache group\apache\htdocs\women\tmp7zrs6o4323.php on line 10
Here's the code:
("SELECT * FROM Contacts WHERE FirstName Not Like "" ORDER BY FirstName;"
I imagine it has something to do with the double quotation marks, but I can't figure it out. It works fine when you test the SQL statement.
Help!!!
Bobby
I'm Beginning to See the Light
Replied 10 Dec 2001 15:57:17
10 Dec 2001 15:57:17 Keith Slater replied:
Can u post all your code at the top
Keith Slater
Keith Slater
Replied 13 Dec 2001 10:48:44
13 Dec 2001 10:48:44 Tim Green replied:
Change the double quotes in your SQL to single quotes.
Tim Green
Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Tim Green
Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 14 Dec 2001 02:22:58
14 Dec 2001 02:22:58 Bobby Jenkins replied:
Hey,
Thanks much! That was the problem, alright.
Bobby
I'm Beginning to See the Light
Thanks much! That was the problem, alright.
Bobby
I'm Beginning to See the Light