Jump to content

marco-marco

Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

marco-marco's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ok, thanks for your help.
  2. its set to date field. order by works fine if i dont use date format, but with it, it reverses. so orders by date, month then year, instead of year month date
  3. When i use the following code, in order to ORDER BY dateStart, it orders by the day due to using date format. ie: 18-01-2005 19-03-2004 27-12-2005 is there anyway to order by the the year month then day in this date format? DATE_FORMAT(dateStart,\'%d-%m-%Y\' )AS dateStart, DATE_FORMAT(dateEnd, \'%d-%m-%Y\')AS dateEnd ORDER BY dateStart
  4. I am trying to create a new user, so i dont have to use the \'root\' username on a website. I can create the user fine, but when i go to call a php script, with the newly created user, MySQL crashes. I get a message that it is overwriting memory :?: my code woks perfectly fine with the \'root\' user, but not any other, so im sure its not the code. im using mysql control center 0.9.3 to create the user, which has worked in the past successfully, and mysql v4.10. an exact example i have tryed is: userid: test pwd: test host: localhost with granting full previleges to one database, which results in the same error as above. Does anyone know why?
  5. Thanks all, for gizmola, the tables are in the following form: UniqueID Reference Date etc 1 1 2003-09-09 2 1 2003-08-09 3 2 2004-01-17 4 1 2002-12-29 etc etc
  6. I have many records each with a date assigned that refer to a unique id number . Is there an easy way to find the earliest and latest date stored for each id number when the earliest date may not be the first id number stored?
  7. Is there a query which can be run that will dump the whole contents of a MySQL databse? What im looking to do is construct some php code with a query to dump the contents of a databse every so often, for exampling setting up scheduled tasks on windows or cronjobs on linux to run this code every so oftem to produce a back up of the databse. Marco
  8. I changed over to MySQL version 4.1 Ever since i did this i have not been able to retrive a password in my php script. I have changed the length to 41 bytes in the tables and set new passwords to test, but there still not working. any ideas why :?: ther querys in using are these. im sure these arn\'t wrong INSERT INTO customer (custID, pass) values (\'1\',PASSWORD(\'mypass\')) and to retreive the values SELECT * FROM customer WHERE custID = \'1\' AND pass = PASSWORD(\'mypass\') the result is empty.... :roll:
  9. there is a function \"mysql> dayofyear(\'2003-08-01\')\" which will return the value \"213\". Is there a way of entering \"213\" and getting \"2003-08-01\" ??
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.