If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > MySQL Functions

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-20-06, 11:34
Rday Rday is offline
Registered User
 
Join Date: Feb 2006
Posts: 3
MySQL Functions

I can't get the following functions to work. Anyone know why?

select subtime(endtime,starttime) from huntlog

select substr(food,1,1) from huntlog

MySQL spits back

#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '( endtime , starttime ) from huntlog
LIMIT 0, 30' at line 1


It seems these functions don't want to work. Column names are valid. I've done selects on them, but the functions don't work. I can do

select count(*) from huntlog

Any help is appreciated.

Thanks.
Reply With Quote
  #2 (permalink)  
Old 07-20-06, 12:24
dbmab dbmab is offline
Registered User
 
Join Date: Apr 2006
Location: Denver, Co. USA
Posts: 240
The most obvious question is what version of mysql are you using?

From the mysql manual -
Quote:
SUBSTR() is a synonym for SUBSTRING(), added in MySQL 4.1.1.
SUBTIME() was added in MySQL 4.1.1.
Reply With Quote
  #3 (permalink)  
Old 07-20-06, 12:28
Rday Rday is offline
Registered User
 
Join Date: Feb 2006
Posts: 3
Well....

Here's the funny part (probably should've mentioned this earlier). I'm running 5.0.12 on my machine, but connect to a work server that's running an earlier version (3.XX) I believe. I'm going to assume 5.0.12 is getting confused somehow and referencing an .ini or .dll for the earlier version.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On