| aidehua | Is there an easy way to dump just the schema of a mySQL database? |
| snoyes | aidehua: mysqldump -d dbName |
| cynic | snoyes: Yesh. |
| aidehua | snoyes: thanks |
| snoyes | cynic: WHERE 2006 BETWEEN YEAR(start) AND YEAR(end) |
| action | cynic throws away the 50 line function! |
| cynic | throws away the 50 line function! thanks! |
| snoyes | Yes! 98% compression! |
| seekwill | snoyes: WHERE 2006 BETWEEN start AND end? |
| snoyes | I don't think that will fly if start and end are dates. |
| seekwill | mysql> 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. |
| snoyes | check your warnings |
| seekwill | But will it work using indexes? :) |
| snoyes | I guess you could do something like WHERE '2006-01-01' < end AND '2006-12-31' > start, to maybe get an index range. |
| jwl007 | is there anyway i could override the + operator for strings to make it act like MySQL's concat function? |
| snoyes | jwl007: Sure, dive into the source code. |
| jwl007 | :P what about in a stored procedure |
| seekwill | jwl007: Is + the SQL standard? |
| jwl007 | not sure, but its the way sybase does it |
| SimplySeth | http://phpfi.com/218645 is there a way to merge the results of two columns into one ? |
| snoyes | !man concat |
| the_wench | see http://dev.mysql.com/doc/refman/5.0/en/string-functions.html |
| snoyes | jwl007: would || suffice for you? |
| SimplySeth | hmmm I asked the wrong question http://phpfi.com/218645 is there a way to merge two columns into one ? |
| snoyes | SimplySeth: concat. |