CodeExtinguisher's Website Code |
[eluser]Isern Palaus[/eluser]
Thanks! This post will help me a lot! Actually I need to know how to use the pagination class and i need more than a simple reference in the user guide (i don't say that is bad, but who don't know fully English sometimes need more than a quote (ie: Examples working)). By the way I also need to know how use models in CI. I've never used them but I wish to use and another time the best way to see how it works is to see a site using models running :-)! A lot of thanks Zaatar! See you, -- Isern Palaus
[eluser]Isern Palaus[/eluser]
Ouch... first problem understanding one of the models: I'm in http://jtaby.com:82/svn/codex_site/syste...gins_m.php: Code: function getPlugins ($num=-1,$offset=-1){ I don't understand why you set -1 value. I suppose this value is set if no value is passed when you call the function on a controller. It's called on controller plugins.php Code: if($num === "all"){ When you the $num (segment 3 on the URI) is equal at all you call $this->plugins_m->getPlugins($config['per_page']); the getPlugins() will create a SQL like this: Code: SELECT * from plugins order by created_at desc limit 10 What more, if you call $this->plugins_m->getPlugins($config['per_page'],$num) will create a SQL like this: Code: SELECT * from plugins order by created_at desc limit 10,10 It is? Thanks in advance and thanks for sharing! See you, -- Isern Palaus
[eluser]Majd Taby[/eluser]
Hey Isern, Is you problem in understanding the sql queries or why I chose the -1 as the default value?
[eluser]Isern Palaus[/eluser]
[quote author="Zaatar" date="1198430609"]Hey Isern, Is you problem in understanding the sql queries or why I chose the -1 as the default value?[/quote] Hello Zaatar, I understand the SQL Queries and probably why choosing the -1 value. I think that the explanation in on my latest post it's correct, no? Depending if you pass a $offset value will add the ,$offset... Well, I will try to code. I think that will works! ![]() Regards, -- Isern Palaus
[eluser]Majd Taby[/eluser]
heh yeah. The reason I chose -1 is because sometimes you might want to pass a value of 0. -1 will never be a valid number to be passed.
[eluser]JOKERz[/eluser]
where is function to edit the post? or function to upload file/images??
[eluser]Muser[/eluser]
I'm really excited with the upcoming 1.5 release of CE. When can we see it? Thank you very much!
[eluser]Majd Taby[/eluser]
soon, very very soon. i'm actually wrapping it up.
[eluser]Majd Taby[/eluser]
hey guys...sorry i forgot about this for a while...i have updated all the links
[eluser]Unknown[/eluser]
Hi ! I'm a biginner with CI and I found this post about CE. This project seems to be awesome and useful! I can see that your last post was on february in 2008. How CE going now? EDIT : I found the informations there : http://ellislab.com/forums/viewthread/120475/ ![]() |
Welcome Guest, Not a member yet? Register Sign In |