BaseNow - Database Front-End Software
*
Home Buy Download Details Support
BaseNow Forums 
Home
Login Register Member List
  » BaseNow Forums   » Questions   » need help! mysql query  

Welcome Guest ( Login or Register )


need help! mysql query
Author
Message
Posted 10/19/2006 2:33 AM
Forum Member
Forum Newbie

Group: Forum Members
Active: 10/25/2006
Posts: 3
hi
im using this revelution studio program (free trial)
found at http://runrev.com/

and now i have connected a databas...
and im making a query, but it does not work!!
its going to show todays date + 7 days... if you understand

i have tried different versions of code....

SELECT * FROM table WHERE date <= CURRENT_DATE + 7
SELECT * FROM table WHERE date <= DATE + 7
SELECT * FROM table WHERE date <= DATE() + 7

IP Logged
This member is offline.
Posted 10/23/2006 12:10 AM
Forum Administrator
Forum Administrator

Group: Advanced Members
Active: 3/7/2010
Posts: 64
Could you send me the exact text of an error message you receive?

Which database format Revolution Studio is using?

These words must be supported by a database engine in order for your SQL statements to work:
CURRENT_DATE
DATE
DATE()
IP Logged
This member is offline.
Posted 10/25/2006 7:21 AM
Forum Member
Forum Newbie

Group: Forum Members
Active: 10/25/2006
Posts: 3
I have a mysql server/service. and upploded the database whit that...
and when im connecting to the database from revelution studio i use my own ip
IP Logged
This member is offline.
Posted 10/25/2006 7:29 AM
Forum Member
Forum Newbie

Group: Forum Members
Active: 10/25/2006
Posts: 3
the problem is like a bug...
when im writing that

SELECT * FROM table WHERE date <= CURRENT_DATE + 7
then it shows nothing

SELECT * FROM table WHERE date <= CURRENT_DATE + 70
then it shows "karl"

SELECT * FROM table WHERE date <= CURRENT_DATE + 100
then it shows "karl" and "john"

SELECT * FROM table WHERE date <= CURRENT_DATE + 150
then it shows nothing

SELECT * FROM table WHERE date <= CURRENT_DATE
then it shows "karl"

SELECT * FROM table WHERE date <= CURRENT_DATE + 2
then it shows nothing

???? its like a bug? or the statement is not correkt
IP Logged
This member is offline.
Posted 10/29/2006 11:55 PM
Forum Administrator
Forum Administrator

Group: Advanced Members
Active: 3/7/2010
Posts: 64
MySQL is not really my area of expertise, but in SQL Server when you want to add certain number of days to a date, you use a built-in function DATEADD. I have found out that you can use ADDDATE() or DATE_ADD() functions in MySQL to perform the same task. For more information, please visit this web page:
http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html
IP Logged
This member is offline.
Showing page 1 of 1 - 5 messages found
« Next Oldest :: Next Newest »

Powered by InstantForum.NET v3.4
Copyright © 2002, 2004, InstantASP Ltd. All rights reserved.