Forum Home
|
Marketplace
|
Articles
|
Blogs
|
Interviews
|
Tools
REGISTER
|
SEARCH
|
MEMBERS
|
F.A.Q.
Register Here
Forum Rules
Webmaster-Talk.com
>
Web Administration Talk
>
The Database Forum
>
MySQL, SQL IFNULL
Link Back
Thread Tools
MySQL, SQL IFNULL
08-31-2004, 04:50 PM
#
1
(
permalink
)
MySQL, SQL IFNULL
wbmstr2good
Average Talker
Posts: 22
Talkupation:
How do I properly use this function in an SQL query. This is how I'm doing it:
SELECT EVENTID, USERNAME, IFNULL(COMMENTS, "") FROM EVENTS;
What am I doing wrong?
When You
Register
, These Ads Go Away!
08-31-2004, 05:16 PM
#
2
(
permalink
)
Anacrusis
Defies a Status
Posts: 2,099
Name: Adam
Location: Colchester CT
Talkupation:
Seems correct to me, are you getting any errors? What version of mySql are you running?
08-31-2004, 05:26 PM
#
3
(
permalink
)
wbmstr2good
Average Talker
Posts: 22
Talkupation:
I'm running the ODBC connector 3.51 and the error I'm getting is as follows:
ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.
/manageevents.asp, line 35
And here is Line 35:
strComments = adoRS("COMMENTS")
08-31-2004, 05:29 PM
#
4
(
permalink
)
Anacrusis
Defies a Status
Posts: 2,099
Name: Adam
Location: Colchester CT
Talkupation:
Try this:
SELECT EVENTID, USERNAME, IFNULL(COMMENTS, "") as COMMENTS
09-01-2004, 12:34 PM
#
5
(
permalink
)
wbmstr2good
Average Talker
Posts: 22
Talkupation:
got it, I was using double quotes instead of single, and no AS columnname
« Reply to
MySQL, SQL IFNULL
Previous Thread
|
Next Thread
Webmaster-Talk.com
>
Web Administration Talk
>
The Database Forum
>
MySQL, SQL IFNULL
Thread Tools
Show Printable Version
Email this Page
Posting Rules
You
may not
post new threads
You
may not
post replies
You
may not
post attachments
You
may not
edit your posts
vB code
is
On
Smilies
are
On
[IMG]
code is
On
HTML code is
Off
Trackbacks
are
Off
Pingbacks
are
Off
Refbacks
are
Off
Webmaster Resources Marketplace:
Software Development Company
|
Webhosting.UK.com
Web Templates
|
Text Link Brokers
|
Stock Photos
Feeds:
RSS
JS
XML
Feeds for this forum:
RSS
JS
XML
Mark Forums Read
-
View Forum Leaders
-
Contact Us
-
Webmaster Forum
-
Advertise
-
Archive
-
Privacy Statement
-
Top
Page generated in
0.14406
seconds with
12
queries