Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Jelmer Schreuder
Fuel core developer, check my bio on the about page.
Discussions
1
Comments
792
Activity
Stopping template render, switch template file, render?
before() doesn't stop the main method from being executed, after() as well is just a method and doesn't do anything to stop the method from being executed. The only thing special about those 2 methods is that they're ALWAYS executed …
Comment by
Jelmer Schreuder
May 2011
permalink
ORM inserts with relationships
The problem is that the relation needs the primary keys in order to be established, but to get to that the model_to still had to get saved first. This shouldn't be necessary and I fixed it in the develop branch, but for now you can get it to w…
Comment by
Jelmer Schreuder
May 2011
permalink
Multiple Checkboxes and Radio Buttons
There wasn't until 5 minutes ago, now you can pass the value or an array of values (for checkboxes) and the inputs will be checked when they have a corresponding value. (this only works when using the options array, otherwise you'll have …
Comment by
Jelmer Schreuder
May 2011
permalink
Validators not working for me?
You should use PHP's build in is_numeric here, it's better than the validate_string rule for this goal.
Comment by
Jelmer Schreuder
May 2011
permalink
Validation errors
It returns an array of Validation_Error objects, so something like: foreach ($val->errors() as $e) { echo $e; }
Comment by
Jelmer Schreuder
May 2011
permalink
Validators not working for me?
Jon Pokress wrote on Friday 20th of May 2011: Thanks, this works, sorta (the user gets a not so nice message 'Validation rulle is_numeric failed for {field}' - yuk : ) That is shown for every rule that doesn't have a message set …
Comment by
Jelmer Schreuder
May 2011
permalink
Validation errors
Errors are returned as Validation_Error objects, they have a __toString() method so if you just echo them (or cast to string in another way) they'll output as the error messages you're expecting.
Comment by
Jelmer Schreuder
May 2011
permalink
Validators not working for me?
It doesn't check whether your input is numeric, it just converts the input to a float and compares that with the arguement you've given. In this case "S" is converted to 0.0 and matches "0" and is allowed. If you want…
Comment by
Jelmer Schreuder
May 2011
permalink
ORM inserts with relationships
Could you post your actual models to scrpyrd.com? This looks like it's been configured wrong.
Comment by
Jelmer Schreuder
May 2011
permalink
order_by random?
Actually I think this should work when RAND() is passed in a Database_Expression object: $query->order_by(DB::expr('RAND()')); But the Orm doesn't support this yet, if you need this make a bugreport on http://github.com/fuel/orm/…
Comment by
Jelmer Schreuder
May 2011
permalink
Validators not working for me?
It's a bug though not an important one: the ->add_field() method is only meant to be used when passing rules as a string (which is a simple shortcut for using add()->add_rule()->etc...). Because the add_field() method was basicly a mo…
Comment by
Jelmer Schreuder
May 2011
permalink
Problems with before() and $this->response->redirect()
The before() method is used the the base Controller_Template, you need to call parent::before() in your new before() method.
Comment by
Jelmer Schreuder
May 2011
permalink
Query Builder to Plain SQL for Debbuging Purposes?
oops, made a mistake: $query = \DB::select( 'id' ) ->from( 'users' ) ->where( 'username', '=', $username ) ->where( 'password', '=', $password ); $sql = (string) $query; …
Comment by
Jelmer Schreuder
May 2011
permalink
Query Builder to Plain SQL for Debbuging Purposes?
That's actually surprisingly easy: $query = \DB::select( 'id' ) ->from( 'users' ) ->where( 'username', '=', $username ) ->where( 'password', '=', $password ) ->e…
Comment by
Jelmer Schreuder
May 2011
permalink
module views and classes/view
For clarity: Sebastien is correct, the ViewModels still need views so you'll need both when using ViewModels and the "classes/view" dir can be ignored when you're just using Views.
Comment by
Jelmer Schreuder
May 2011
permalink
modules + relation orm
Check out the docs on this, by configuring the "model_to" property you can relate to any class. When the other model is in the app it will be just the classname, for models from other modules or from packages you must include the namespac…
Comment by
Jelmer Schreuder
May 2011
permalink
How to remove folder and index.php from URL path
Either use an .htaccess to rewrite all requests to /public/index.php or just move the files from public to your root and edit the relative paths to your app, core & packages dirs in the index.php.
Comment by
Jelmer Schreuder
May 2011
permalink
ORM inserts with relationships
It was never intended to work like this, a foreign key and primary key aren't expected to be the same thing. You can do this but you'll have to solve all the troubles stemming from that yourself. Each table is expected to have its own pk,…
Comment by
Jelmer Schreuder
May 2011
permalink
ORM inserts with relationships
Each table is expected to have its own unique primary key(s), if you don't auto-increment them you need to set those IDs manually before saving.
Comment by
Jelmer Schreuder
May 2011
permalink
Database_Query_Builder_Delete error
Next release (RC3) should be soon, it's almost ready to be called final (lack of a hell of a lot of core unit tests is preventing that from happening soon). There's not much holding up the next release, no experimental stuff in the dev br…
Comment by
Jelmer Schreuder
May 2011
permalink
Database_Query_Builder_Delete error
This has been fixed in the dev branch and will be in the next release.
Comment by
Jelmer Schreuder
May 2011
permalink
ORM inserts with relationships
No, that just means you didn't make it auto-increment.
Comment by
Jelmer Schreuder
May 2011
permalink
ORM inserts with relationships
When saving relations like this, the apropriate foreign keys will be set automaticly.
Comment by
Jelmer Schreuder
May 2011
permalink
ORM inserts with relationships
The way you do it it'll be a stdClass object and not a Model_Music object. You need to create the new Model_Music instance yourself: $list = new Model_List(); $list->list_title = Input::post('title'); $list->list_cont…
Comment by
Jelmer Schreuder
May 2011
permalink
Problem when logged in multiple browsers
http://fuelphp.com/forums/topics/view/1506
Comment by
Jelmer Schreuder
May 2011
permalink
More Comments
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
About
Username
Jelmer Schreuder
Joined
January 2011
Visits
7
Last Active
May 2016
Roles
Administrator