⚠ 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 forum is read-only and soon will be archived. ⚠


Member Since 07 May 2014
Offline Last Active May 09 2015 03:28 PM

Posts I've Made

In Topic: Little question about a n_n relation

06 May 2015 - 08:07 AM

Hi again, still having the same issue after some research.


Can anyone post working code for table creation (SQL) + CRUD ?


Just like the one on the example:




which seems to work adding/editing the 1..N field

In Topic: grocery crud issues

08 April 2015 - 11:15 AM

Have a look at your view file (html).


This code in the header:


foreach($css_files as $file): ?>
<link type="text/css" rel="stylesheet" href="<?php echo $file; ?>" />
<?php endforeach; ?>
<?php foreach($js_files as $file): ?>
<script src="<?php echo $file; ?>"></script>
<?php endforeach; ?>
For some reason, view is not receiving the correct values for $js_files and $css_files vars.
You can try to remove these lines and see if it works (it may look ugly because of no css styles, and may have lacking funcionalities because of missing js files).
If this fixes your problem, next step would be finding why $js_files and $css_files dont have a correct value, and solving it (probably error is located in the controller)

In Topic: Little question about a n_n relation

08 April 2015 - 11:10 AM

I deleted the constraint (key and foreign key) but when adding insert '0' in foreign key


Same here. I'm getting a 0 when adding, and correct value when editing.

In Topic: Two different functions on callback_after_insert()

03 April 2015 - 02:01 PM

I'm afraid that function2 rewrites function1.


Can't you use a single function (function2), and call function1 inside it?

In Topic: Select a specific image from IC

01 April 2015 - 02:55 PM

Is your code similar to this?
$image_crud = new image_CRUD();
$output = $image_crud->render();
What I would do is have a look at the image_CRUD class to see if you can use the $image_crud object to do some sort of filtering, getting one object instead of all 30. Luckily you have full access to the code and can search for it :-)