#mysql - Fri 23 Mar 2007 between 11:30 and 11:42

NY Lost Funds



aidehuaIs there an easy way to dump just the schema of a mySQL database?
snoyesaidehua: mysqldump -d dbName
cynicsnoyes: Yesh.
aidehuasnoyes: thanks
snoyescynic: WHERE 2006 BETWEEN YEAR(start) AND YEAR(end)
actioncynic throws away the 50 line function!
cynicthrows away the 50 line function!
thanks!
snoyesYes! 98% compression!
seekwillsnoyes: WHERE 2006 BETWEEN start AND end?
snoyesI don't think that will fly if start and end are dates.
seekwillmysql> SELECT 2007 BETWEEN '2005-03-01' AND '2007-01-01';
+--------------------------------------------+
| 2007 BETWEEN '2005-03-01' AND '2007-01-01' |
+--------------------------------------------+
| 1 |
+--------------------------------------------+
mysql> SELECT 2008 BETWEEN '2005-03-01' AND '2007-01-01';
+--------------------------------------------+
| 2008 BETWEEN '2005-03-01' AND '2007-01-01' |
+--------------------------------------------+
| 0 |
+--------------------------------------------+
?
I don't know about other considerations though.
snoyescheck your warnings
seekwillBut will it work using indexes? :)
snoyesI guess you could do something like WHERE '2006-01-01' < end AND '2006-12-31' > start, to maybe get an index range.
jwl007is there anyway i could override the + operator for strings to make it act like MySQL's concat function?
snoyesjwl007: Sure, dive into the source code.
jwl007:P
what about in a stored procedure
seekwilljwl007: Is + the SQL standard?
jwl007not sure, but its the way sybase does it
SimplySethhttp://phpfi.com/218645 is there a way to merge the results of two columns into one ?
snoyes!man concat
the_wenchsee http://dev.mysql.com/doc/refman/5.0/en/string-functions.html
snoyesjwl007: would || suffice for you?
SimplySethhmmm I asked the wrong question
http://phpfi.com/218645 is there a way to merge two columns into one ?
snoyesSimplySeth: concat.

Page: 2 9 16 23 30 37 44 51 58 

IrcArchive

NY Lost Funds