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.
WanWizard
a.k.a. WanWizard
Discussions
4
Comments
8245
Activity
Simple query builder question
The query builder escapes all values passed.
Comment by
WanWizard
May 2011
permalink
order_by random?
The query builder's identifier quote method can't deal with functions without parameters (it identifies a function by looking for a double quote, not by brackets). I suggest you'll report this as an issue https://github.com/fuel/core…
Comment by
WanWizard
May 2011
permalink
Noob Question: 'No input file specified' message
The question mark is indeed required when using fastcgi. It should NOT be there for normal Apache setups.
Comment by
WanWizard
May 2011
permalink
Bug with file validation?
I don't think you can validated an form field of type 'file', as it will not be part of $_POST, it will be part of $_FILES. Use the Upload class to validate and process uploaded files.
Comment by
WanWizard
May 2011
permalink
Batch DB::insert
From what I can see in the code that is already supported by the Query Builder.
Comment by
WanWizard
May 2011
permalink
Kind of complicated queries (example)
Harro Verton wrote on Wednesday 18th of May 2011: The DB::query()->execute() is the way to go. You get the error message because somewhere in your code you try to manipulate the query result. It is returned as a result object, which you can…
Comment by
WanWizard
May 2011
permalink
ORM inserts with relationships
As Jelmer stated, this is not the way it works, nor is it best practice database design. Every table needs it's own id as primary key. period. And it is best practice that the primary key is an abstract auto increment number, and not part of t…
Comment by
WanWizard
May 2011
permalink
Kind of complicated queries (example)
The DB::query()->execute() is the way to go. You get the error message because somewhere in your code you try to manipulate the query result. It is returned as a result object, which you can't modify (i.e. you can not assign anything to it).
Comment by
WanWizard
May 2011
permalink
404 router multiple recursion problem
Just pushed an update to the develop branch that checks the 404 route with and without route processing, before failing with a recursion error. This should provide a workaround for your problem. Note that the preferred solution is still to make sur…
Comment by
WanWizard
May 2011
permalink
404 router multiple recursion problem
So make sure your 404 route doesn't get routed somewhere else...
Comment by
WanWizard
May 2011
permalink
REST Client
Class Controller_Test extends \Controller_Rest { // your code here } See http://fuelphp.com/docs/general/controllers/rest.html for more information.
Comment by
WanWizard
May 2011
permalink
404 router multiple recursion problem
Look closely at what you have configured. You request something that doesn't exist. Fuel detects this, and loads the 404 route. It feeds the route into the Request object, which gets routed. Now, "kancelarske/404" matches your new &q…
Comment by
WanWizard
May 2011
permalink
Kind of complicated queries (example)
You don't. The ORM isn't make for custom queries, it is made to deal with records and relationships between them. If you want something complicated, just use the DB class directly.
Comment by
WanWizard
May 2011
permalink
404 router multiple recursion problem
If you get a 404 recursion error, it means your 404 route is not correct. According to your config, it tries to load an app controller called kancelarske, and call the action_404 method in that controller. If either the controller can't be loa…
Comment by
WanWizard
May 2011
permalink
Extending Validation Classs
@Mitchell, Your app/bootstrap.php needs to contain: Autoloader::add_classes(array( 'Session' => APPPATH.'classes/session.php', )); And your session class extension needs to be defined as class Session extends Fuel\Core\Se…
Comment by
WanWizard
May 2011
permalink
Extending Validation Classs
Hijacking this thread: you're the first that I know off that extends a lot of core classes. Any particular reason for this? Extending in Fuel should not be needed unless you want to replace existing methods, in which case I'm interested i…
Comment by
WanWizard
May 2011
permalink
looking for LIMIT $start, $limit
Depending on how you would like to use it. For chaining, the ORM just uses the database class: http://fuelphp.com/docs/classes/database/usage.html#filtering. If you use an options array, the structure is similar.
Comment by
WanWizard
May 2011
permalink
Adding 3rd party libraries
It's difficult to answer without knowing what the code looks like. For classes with a single driver instance, you would do something like class Baseclass { protected static $instance = null; public static function _init() { …
Comment by
WanWizard
May 2011
permalink
db backend
I was a bit confused about the term "database backend", but after looking at the link provided, you mean an authentication and authorisation system? Yes, it's included in Fuel by default, in the package Auth. It has support for users…
Comment by
WanWizard
May 2011
permalink
Adding 3rd party libraries
Not sure what you mean. Normally, you have a base class that uses one more drivers. The base class can have a static _init() method, which is called when the class is loaded by the autoloader. If you want you can use that to load a (default) driver…
Comment by
WanWizard
May 2011
permalink
Calling package dynamically
\Fuel::add_package('mypackage'); \Mypackage::classname(); See the docs (http://fuelphp.com/docs/classes/fuel.html), or the api browser (http://fuelphp.com/api/).
Comment by
WanWizard
May 2011
permalink
Writing tests on class with protected properties.
Ideally, you would only test the method conditions (input/output), everything in the method should be a black box as far as the calling code is concerned. Same is true for protected or private properties, they are not visible and/or accessable by t…
Comment by
WanWizard
May 2011
permalink
Asset class
I replied from memory, always check the docs ( which do say you need echo in case of render() ).
Comment by
WanWizard
May 2011
permalink
Capture Errors
Correct.
Comment by
WanWizard
May 2011
permalink
OR in where clause
The model methods return themselfs so you can chain. Nobody's saying you should do that all in one go // this is the same as Model_Example::query() ->where_open() ->where('A', '=', 1) ->or_where…
Comment by
WanWizard
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
WanWizard
Joined
January 2011
Visits
2,417
Last Active
11:32AM
Roles
Administrator