Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17992/mods/easymod/em_includes
Modified Files:
em_schema.php
Log Message:
- CREATE TABLE queries with INDEXes should now work.
- Actions with IN-LINE as a substring now get reported as unprocessed commands as appropriate.
- Fixed some random bug introduced in 1.7 of admin_easymod.php.txt.
Index: em_schema.php
===================================================================
RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_schema.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** em_schema.php 20 May 2005 23:39:31 -0000 1.5
--- em_schema.php 27 May 2005 08:10:50 -0000 1.6
***************
*** 263,266 ****
--- 263,273 ----
*/
+ // KEY is normally a synonym for INDEX, as per the following link:
+ // http://dev.mysql.com/doc/mysql/en/create-table.html#id3038496
+ if (strtoupper($name) == 'INDEX')
+ {
+ $name = 'KEY';
+ }
+
// let's see if it's a key or primary key; if it's a malformed key, then the checks after this block should catch it
if (((strtoupper($name) == 'KEY') || (strtoupper($name) == 'PRIMARY')) && ($type == 'undefined') && (!is_numeric( $length)))
|