How can I make a ONE model for edit delete update?

#1
[eluser]ogib[/eluser]
This is mysql databases on my project.

category|c_id
product|p_id|c_id
properties|pr_id|p_id

To clarify: the category table contained in the categories of products in the product table contains only those products in a table containing all the properties for The Nature products. The Nature of the products are very different for each product!
How can I make a ONE model for edit delete update?
Sorry for my terrible English!

#2
[eluser]InsiteFX[/eluser]
Code:
public function edit($table_name, $src_id, $id, $data)
{
    $this->db->where($src_id, $id);
    $this->db->update($table_name, $data);
}

Something like that.

#3
[eluser]WanWizard[/eluser]
Or have a look at Jamie's base model

#4
[eluser]ogib[/eluser]
Thank you for your help, but it comes to the table properties in which each row contains a characteristic driven from table product.
For example: a product "shoes" has 10 description, this means 10 lines in the table properties, and another product "hat" has two characteristics that means 2 rows in table properties.
So how how can I make a ONE model for edit delete update
Thank you

#5
[eluser]Alexandre E. Souza (Joker)[/eluser]
I have a class for everythings
do you to want?

#6
[eluser]ogib[/eluser]
Yeah right!

#7
[eluser]Alexandre E. Souza (Joker)[/eluser]
what your e-mail for me send you?

#8
[eluser]ogib[/eluser]
Alexandre E. Souza my email is: ogib@abv.bg

#9
[eluser]Alexandre E. Souza (Joker)[/eluser]
I sent for you!!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.