|
Posted 10/19/2006 2:33 AM |
  |
|
Forum Member

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
|
|
|
|
Posted 10/23/2006 12:10 AM |
  |
|
Forum Administrator

Group: Advanced Members
Active: 8/9/2024
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() |
|
|
|
Posted 10/25/2006 7:21 AM |
  |
|
Forum Member

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 |
|
|
|
Posted 10/25/2006 7:29 AM |
  |
|
Forum Member

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 |
|
|
|
Posted 10/29/2006 11:55 PM |
  |
|
Forum Administrator

Group: Advanced Members
Active: 8/9/2024
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 |
|
|