From: Don S. <do...@se...> - 2003-04-10 19:59:19
|
Did some invesimagating and came to the conclusion that sqlImport in core/Database.php barfs on 'alter table' commands. Mainly it doesn't seem to know when one alter table command ends, so I keep getting "incorrect formatting" errors. I've tried to add a line similar to the "preg_match" for drop table but I can't seem to get my head around it. Once that issue would be resolved, I would probably run into a problem at the end of sqlImport since there is no "alter" case in the switch($command) statement. So if someone with a less fried brain wants to give it a go that would be super. Don. |
From: Don S. <do...@se...> - 2003-04-10 20:11:33
|
Is it in bad taste to have just a function to read a file and run the sql without trying to validate or any of that fancy jazz? Don. On Thu, 10 Apr 2003, Don Seiler wrote: > Did some invesimagating and came to the conclusion that sqlImport in > core/Database.php barfs on 'alter table' commands. Mainly it doesn't seem > to know when one alter table command ends, so I keep getting "incorrect > formatting" errors. > > I've tried to add a line similar to the "preg_match" for drop table but I > can't seem to get my head around it. > > Once that issue would be resolved, I would probably run into a problem at > the end of sqlImport since there is no "alter" case in the > switch($command) statement. > > So if someone with a less fried brain wants to give it a go that would be > super. > > Don. > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger > for complex code. Debugging C/C++ programs can leave you feeling lost and > disoriented. TotalView can help you find your way. Available on major UNIX > and Linux platforms. Try it free. www.etnus.com > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > > |
From: Don S. <do...@se...> - 2003-04-10 20:15:14
|
Hm I suppose we wouldn't be able to do table prefixes then. I suppose the best avenue is to fix the sqlImport() function. In researching that endeavour, I also noticed that extractTableName doesn't support alter table either. I'll work on some fixin's from home if I have get some time. Don. On Thu, 10 Apr 2003, Don Seiler wrote: > Is it in bad taste to have just a function to read a file and run the sql > without trying to validate or any of that fancy jazz? > > Don. > > On Thu, 10 Apr 2003, Don Seiler wrote: > > > Did some invesimagating and came to the conclusion that sqlImport in > > core/Database.php barfs on 'alter table' commands. Mainly it doesn't seem > > to know when one alter table command ends, so I keep getting "incorrect > > formatting" errors. > > > > I've tried to add a line similar to the "preg_match" for drop table but I > > can't seem to get my head around it. > > > > Once that issue would be resolved, I would probably run into a problem at > > the end of sqlImport since there is no "alter" case in the > > switch($command) statement. > > > > So if someone with a less fried brain wants to give it a go that would be > > super. > > > > Don. > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger > > for complex code. Debugging C/C++ programs can leave you feeling lost and > > disoriented. TotalView can help you find your way. Available on major UNIX > > and Linux platforms. Try it free. www.etnus.com > > _______________________________________________ > > Phpwebsite-developers mailing list > > Php...@li... > > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger > for complex code. Debugging C/C++ programs can leave you feeling lost and > disoriented. TotalView can help you find your way. Available on major UNIX > and Linux platforms. Try it free. www.etnus.com > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > > |
From: Don S. <do...@se...> - 2003-04-10 20:26:49
|
Alright. After some light analysis here is the RFE for supporting ALTER TABLE commands in core. 1. Need to support "alter" in extractTableName(). 2. Need to support full alter table syntax in extractSQLData(). 3. Need to create sqlAlterTable() function, similar to sqlCreateTable() etc. 4. Need to support "alter" in sqlImport() function. If you see a flaw in my plan let me know. Otherwise I'll start fumbling through this tonight while my spouse is distracted by Will&Grace. Scrubs is my one true god. Don. |
From: Don S. <do...@se...> - 2003-04-10 20:34:46
|
PLAN B: I get a clue and use the sql(Add|Modify|Drop)Column() functions already in place instead of writing sqlAlterTable(). Still need to do the other steps though. Don. On Thu, 10 Apr 2003, Don Seiler wrote: > Alright. After some light analysis here is the RFE for supporting ALTER > TABLE commands in core. > > 1. Need to support "alter" in extractTableName(). > 2. Need to support full alter table syntax in extractSQLData(). > 3. Need to create sqlAlterTable() function, similar to sqlCreateTable() > etc. > 4. Need to support "alter" in sqlImport() function. > > If you see a flaw in my plan let me know. Otherwise I'll start fumbling > through this tonight while my spouse is distracted by Will&Grace. Scrubs > is my one true god. > > Don. > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger > for complex code. Debugging C/C++ programs can leave you feeling lost and > disoriented. TotalView can help you find your way. Available on major UNIX > and Linux platforms. Try it free. www.etnus.com > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > > |
From: Don S. <do...@se...> - 2003-04-10 22:06:37
|
Alright I think I have the code in place and checked in. I have some more testing that I want to do but it is in CVS for you to test out. Basically what started this all was I wanted to have my sql statements for my update scripts in their own sql file, instead of embedded in php. Don. On Thu, 10 Apr 2003, Don Seiler wrote: > PLAN B: > > I get a clue and use the sql(Add|Modify|Drop)Column() functions already in > place instead of writing sqlAlterTable(). Still need to do the other > steps though. > > Don. > > On Thu, 10 Apr 2003, Don Seiler wrote: > > > Alright. After some light analysis here is the RFE for supporting ALTER > > TABLE commands in core. > > > > 1. Need to support "alter" in extractTableName(). > > 2. Need to support full alter table syntax in extractSQLData(). > > 3. Need to create sqlAlterTable() function, similar to sqlCreateTable() > > etc. > > 4. Need to support "alter" in sqlImport() function. > > > > If you see a flaw in my plan let me know. Otherwise I'll start fumbling > > through this tonight while my spouse is distracted by Will&Grace. Scrubs > > is my one true god. > > > > Don. > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger > > for complex code. Debugging C/C++ programs can leave you feeling lost and > > disoriented. TotalView can help you find your way. Available on major UNIX > > and Linux platforms. Try it free. www.etnus.com > > _______________________________________________ > > Phpwebsite-developers mailing list > > Php...@li... > > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger > for complex code. Debugging C/C++ programs can leave you feeling lost and > disoriented. TotalView can help you find your way. Available on major UNIX > and Linux platforms. Try it free. www.etnus.com > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > > |
From: Don S. <do...@se...> - 2003-04-11 01:48:49
|
Also need update support for sqlImport. If someone else wants to take that feel free. Don. On Thu, 10 Apr 2003, Don Seiler wrote: > Alright I think I have the code in place and checked in. I have some more > testing that I want to do but it is in CVS for you to test out. > > Basically what started this all was I wanted to have my sql statements for > my update scripts in their own sql file, instead of embedded in php. > > Don. > > On Thu, 10 Apr 2003, Don Seiler wrote: > > > PLAN B: > > > > I get a clue and use the sql(Add|Modify|Drop)Column() functions already in > > place instead of writing sqlAlterTable(). Still need to do the other > > steps though. > > > > Don. > > > > On Thu, 10 Apr 2003, Don Seiler wrote: > > > > > Alright. After some light analysis here is the RFE for supporting ALTER > > > TABLE commands in core. > > > > > > 1. Need to support "alter" in extractTableName(). > > > 2. Need to support full alter table syntax in extractSQLData(). > > > 3. Need to create sqlAlterTable() function, similar to sqlCreateTable() > > > etc. > > > 4. Need to support "alter" in sqlImport() function. > > > > > > If you see a flaw in my plan let me know. Otherwise I'll start fumbling > > > through this tonight while my spouse is distracted by Will&Grace. Scrubs > > > is my one true god. > > > > > > Don. > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger > > > for complex code. Debugging C/C++ programs can leave you feeling lost and > > > disoriented. TotalView can help you find your way. Available on major UNIX > > > and Linux platforms. Try it free. www.etnus.com > > > _______________________________________________ > > > Phpwebsite-developers mailing list > > > Php...@li... > > > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > > > > > > > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger > > for complex code. Debugging C/C++ programs can leave you feeling lost and > > disoriented. TotalView can help you find your way. Available on major UNIX > > and Linux platforms. Try it free. www.etnus.com > > _______________________________________________ > > Phpwebsite-developers mailing list > > Php...@li... > > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger > for complex code. Debugging C/C++ programs can leave you feeling lost and > disoriented. TotalView can help you find your way. Available on major UNIX > and Linux platforms. Try it free. www.etnus.com > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > > |