⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

set_relation - problem



Robert

Robert
  • profile picture
  • Member

Posted 10 April 2014 - 12:01 PM

Is there a limit to how many set_relation can i have ?

I wanted to make a DB with a loot of relations. If i have only 60 it work perfect if i add 1 more then i get this error :

(this happens when trying to view the table .. work fins in add / edit)

 

Fatal error: Call to a member function result() on a non-object in C:\xampp\htdocs\productie2\application\models\grocery_crud_model.php on line 87


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 11 April 2014 - 02:54 AM

set the codeigniter profiler on ... and check the output in form of query.. and try and execute it in the sql console.. if it runs there - it should run fine else there technically is something wrong - u will get in the correct / exact error / issue for the same. It might be with the limitation or the query engine or correctness your syntax ... u will come to know..


Robert

Robert
  • profile picture
  • Member

Posted 11 April 2014 - 08:00 AM

I have tryed that i get QUERIES: 133 ... that strange part is that it work perfect in add/ edit but in view i get that error ... CI logs set to 4 but still no error message ... If it is the limitation any way to increase it ?

 

 

 

Thanks a loot for the help


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 11 April 2014 - 10:02 AM

well unless it is been looked into.. no one will be able to help you in such thing. And doubt some1 will have time to look into the same for such a messive query / configuration or anything.. My suggestion is - in such case - just go with custom view building rather then depending on the view of the grocery crud. That too is at a very base level - do not match in professional look@feel sort of stuff.


Robert

Robert
  • profile picture
  • Member

Posted 11 April 2014 - 13:28 PM

I was thinking the same think .... for the moment i have change 50% of relations to $crud->field_type('dropdown') and got the records with a function from a module .. 

Works perfect but it take a bit of time when loading add section 7-9 seconds. 

 

Wanted to ask you if you have any xp and know if is better to make it custom ... the table has 300+ columns with 50% of them having relations .....


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 11 April 2014 - 15:49 PM

OUCH.... dudes - u might need to restructure your table / data / stuff. There are ppl who engineer their application with such huge list and stuff & unfortunately i have done stfuff with around 150-200 columns.

Technically speaking the time that is taken is more @sql Level if i am not mistakened cuz firing so many joins and retriving data is time consume effort for sure. I might be able to help you in either optimization if possible or might be able to help u restructure your application to deliver stuff smoothly.