Mysql Database issues - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Mysql Database issues (/showthread.php?tid=7398) |
Mysql Database issues - El Forum - 04-09-2008 [eluser]Derek Allard[/eluser] OK, I want to get this fixed up for you guys, could you please provide the code you're using? Mysql Database issues - El Forum - 04-09-2008 [eluser]megabyte[/eluser] Derek, thanks for your concern. I have to admit thats what I love about this community. I will trouble shoot and test things as soon as possible and get back to you. Mysql Database issues - El Forum - 04-09-2008 [eluser]James Pax[/eluser] yay! Thank you Derek Allard! my code is attached to this post, I tried to get it on here as quickly as possible... I hope it's commented enough the file is zip I just changed the ".zip" to ".jpg" edit: ops I don't see any way to grab the .jpg from the post... hopefully your admin privileges can grant you access to it? :long: Mysql Database issues - El Forum - 04-09-2008 [eluser]Derek Allard[/eluser] I'm sorry, I can't recover that. I'm happy to help though. Could you just cut and paste the most basic, simple example that you can that shows this behaviour? I don't need to see any login code, or anything like that, just the few lines that you are using to create the fields. I'm trying to rule out if this is a dbforge thing, or something else. Mysql Database issues - El Forum - 04-09-2008 [eluser]Seppo[/eluser] Derek, with this code Code: $this->load->database(); I'm getting Quote:ALTER TABLE `table_name` ADD Array NOT NULL using MySQLi and Quote:ALTER TABLE `table_name` ADD `last_name` varchar(50) NOT NULLusing MySQL driver Mysql Database issues - El Forum - 04-10-2008 [eluser]James Pax[/eluser] thank you seppo... my internet got cut off last night (ugly provider lol) and had problems sending in my code! anyways... I'm getting this: Code: //get the list of tables gives me no "type" and probably wrong "max_length" in 'mysqli' (edit: I don't know about the primary_key it might return the length of the int,the result doesn't change I guess length of FALSE=0 length of TRUE=1 ?? ) var_dump: Code: array(1) { ["id"]=> array(3) { ["type"]=> string(6) ["max_length"]=> int(1) ["primary_key"]=> int(1) } } then I get just like seppo: Code: ALTER TABLE `users` CHANGE Array NOT NULL (edit: by passing an array like the one above) I'm so happy Derek Allard is going to give a look into it ps: damn had to wait another 5 hours to post this... Mysql Database issues - El Forum - 04-11-2008 [eluser]James Pax[/eluser] I've got my fingers crossed any news? Mysql Database issues - El Forum - 04-11-2008 [eluser]Derek Allard[/eluser] I think you're waiting for me? No, I'm sorry, I haven't even read the forums in 3 days unless I got an email notification. I'm just buried. Your issue is on my "to-do", and the debugging by you and Seppo is very helpful, but I probably won't get to turn my attention to CI for another week or two. Apologies, I didn't mean to have you think it'd be an instant fix Mysql Database issues - El Forum - 04-11-2008 [eluser]Seppo[/eluser] Derek, if I may... Why is the mysqli forge class so different to the mysql? I mean... they both should produce the same SQLs... In MySQL forge you have a method _process_fields that's used twice, while in mysqli you have a similar code in _create_table and some bug code in _alter_table... Could you just look at it for a sec trying to copy+paste the mysql forge to mysqli? Doing that, and replacing the two times MySQL appear seems to fix this issue =) Mysql Database issues - El Forum - 04-11-2008 [eluser]Derek Allard[/eluser] what the!?!? That is SUPPOSED to be what the files look like. Ugh. I've made the change, can you grab a new svn and retest. I need more coffee... ... ... and beer. |