SV: Is there any alternative to MEMO field in MYSQL database?

2001-11-23 Thread Torgil Zechel
TEXT and BLOB types. http://www.mysql.com/doc/B/L/BLOB.html > -Ursprungligt meddelande- > Fran: Hamzat kamal [mailto:[EMAIL PROTECTED]] > Skickat: den 23 november 2001 09:56 > Till: [EMAIL PROTECTED] > Amne: Is there any alternative to MEMO field in MYSQL database? > > > Hi, > > I nee

SV: Need help with SELECT 2 tables from choice of 3

2001-11-22 Thread Torgil Zechel
You can join all three tables together select d.members_id, m.name, old.name from data as d left join members as m on m.members_id=d.members_id left join oldmembers as old on old.members_id=d.members_id If the members_id belongs to an old member, all fields from the member table

SV: Need help with SELECT 2 tables from choice of 3

2001-11-22 Thread Torgil Zechel
Can't you just make a check before you make a call to the DB? if( member_id > 1000 ) // old member query here else // new member query here -Ursprungligt meddelande- Fran: Jerry [mailto:[EMAIL PROTECTED]] Skickat: den 21 november 2001 21:24 Till: [EMAIL PROTECTED] Amne:

SV: Is DATE NOT NULL DEFAULT NOW() legal??

2001-11-21 Thread Torgil Zechel
No, that is not legal. From the manual: "Default values must be constants. This means, for example, that you cannot set the default for a date column to be the value of a function such as NOW() or CURRENT_DATE." http://www.mysql.com/doc/C/R/CREATE_TABLE.html -Ursprungligt meddelande- F

SV: Security of MySQL

2001-11-21 Thread Torgil Zechel
Chapter 4 in the manual is a good place to start! http://www.mysql.com/doc/M/y/MySQL_Database_Administration.html -Ursprungligt meddelande- Fran: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Skickat: den 21 november 2001 09:55 Till: [EMAIL PROTECTED] Amne: Security of MySQL Hello, My

SV: newbie - questions about timestamp(14)

2001-10-18 Thread Torgil Zechel
You can use NOW() to get the current timestamp: mysql> select NOW(); +-+ | NOW() | +-+ | 2001-10-18 12:49:29 | +-+ But it would be easier to let MySQL calculate the elapsed time: select IF(TIME_TO_SEC(NOW()) - TIME_TO_SE

UPDATE with automatic INSERT if not found..

2001-09-13 Thread Torgil Zechel
Hi! I have a counter that is increased each time an event occur. The number of events should be reported as events / month, so along with the counter i have a date-field. The table structure looks like this: table stats count int unsigned not null default 0 date

COUNT elements in a LIMIT query

2001-09-07 Thread Torgil Zechel
Hello! Is it possible to get the total number of records when doing a select with LIMIT? For example, if I do: SELECT * FROM tbl LIMIT 0,10 I would like to get the total number of records in tbl along with the 10 first ones.. I need this to display "showing 0 - 10 of 354", and my quer