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
8243
Activity
Using a module
You need to understand what a module is, and how it works. A module is a completely separate part of your application. It has the same folder structure as your main app folder, with classes, views, etc. It also works the same way as you app. When…
Comment by
WanWizard
December 2012
permalink
Updated_at timestamp !?
If 'true' the field should be defined as a MySQL datetime column, if 'false' it should be defined as INT(11). So the value this field should have depends on the type of column you have defined.
Comment by
WanWizard
December 2012
permalink
Orm\Observer_UpdatedAt
Fields of which table? The Users table?
Comment by
WanWizard
December 2012
permalink
Modules usage..
All classes should go into the "classes" folder. A module needs to have the same structure as your app folder, with "classes", "classes/controller", etc...
Comment by
WanWizard
December 2012
permalink
Using a table_prefix containing '.'
The problem is that when a dot is detected when quoting the identifier, the identifier is split in parts, a table prefix is added, and then it recuses to quote the parts. Which will contain a dot (due to the prefix that was added), which causes the …
Comment by
WanWizard
December 2012
permalink
How can I find a result from Model to return Array, Not object
What does "Model_User::find_by_pk(2)" return? It might return NULL if the record is not found.
Comment by
WanWizard
December 2012
permalink
Tutorial repository
Tutorials are listed on this page: https://github.com/fuel/docs/blob/1.5/develop/installation/tutorials.html
Comment by
WanWizard
December 2012
permalink
Model_Crud
This is a Model_Crud model? I don't see why that would happen. If it's an ORM model, that doesn't have a method called 'find_all'.
Comment by
WanWizard
December 2012
permalink
I need help for structure
There is no relation between the controller name or location, and the way your views are structured. So do it as it's best for you.
Comment by
WanWizard
December 2012
permalink
$total_demo = DB::count_records('mydb'); get error
That's odd. ORM uses the same DB queries, so I don't see why that would work. Have you defined a $_table in your ORM model so that is accesses a different table?
Comment by
WanWizard
December 2012
permalink
Using a table_prefix containing '.'
Can you give more information about this error? Which file and line generates that error? Can you give backtrace? ORM uses the DB classes for database interaction, so in theory it should work fine.
Comment by
WanWizard
December 2012
permalink
Development config not loaded during tests
Unit tests run in the "test" environment, so they don't have access to "development" specific files.
Comment by
WanWizard
December 2012
permalink
Saving Search Result for Pagination
I store them in session flash storage in the search method, after validation of the input. And if no post is present, and check if I can retrieve them from flash. If so, I use that to proceed, if not I redirect away with an error message ('no s…
Comment by
WanWizard
December 2012
permalink
Looking to override package files/classes
Seems like a complicated way of doing things. i just add 'datepicker' to the class value of the form array, and use some jQuery magic to add the datepicker to all fields with this class defined. Ideally, from a "separation of concer…
Comment by
WanWizard
December 2012
permalink
What is best way to extend Orm and Fieldset behavior for custom select options?
We use the following standard in your applications: If the options list is static (i.e. it doesn't change in the course of processing a request), we populate the array in _init(). If the list is dynamic, we use set_form_fields() to populate it…
Comment by
WanWizard
December 2012
permalink
Tutorial repository
You mean adding them to the docs?
Comment by
WanWizard
December 2012
permalink
best way to set up open source project using fuelphp
Not sure they exist. Try pinging Frenkynet, he has a lot more experience with Composer.
Comment by
WanWizard
December 2012
permalink
Pass a domain name in the URL
Not easy. You can use standard URL encoding, %2E for the dot, but that will be converted by the browser and still seen as an extension. Alternatively you can add a 'fake' extension to the URL (http://example.com/domain/mydomain.com.html…
Comment by
WanWizard
December 2012
permalink
URL key for themes and data
http://docs.fuelphp.com/general/routing.html#/inline_routes
Comment by
WanWizard
December 2012
permalink
Pass a domain name in the URL
A dot in the URL defines an extension, as defined in the RFC's. So officially you should encode data that has a dot in it. Alternativly, you can disable striping the extension in the routing section of the config.php (1.4+).
Comment by
WanWizard
December 2012
permalink
URL key for themes and data
You can either use a route to move it to the back of the URI and make it a segment parameter, or define a closure as route, that will get the store code out, and does an HMVC request to the remainder of the URI.
Comment by
WanWizard
December 2012
permalink
best way to set up open source project using fuelphp
If you're asking me: No. Hate the things. Go for composer packages instead.
Comment by
WanWizard
December 2012
permalink
$total_demo = DB::count_records('mydb'); get error
Query looks perfectly fine. Assuming your table name isn't prefixed, I wouldn't know what causes this. What happens if you do DB::query("SELECT COUNT(*) AS total_row_count FROM `mydb`")->execute(); instead?
Comment by
WanWizard
December 2012
permalink
ORM error - 1064 You have an error in your SQL syntax .... near '."id" AS "t0_c0"
That query uses double quotes to escape column names, which MySQL doesn't like. Do you have 'identifier' defined somewhere in your db.php database definition? If not, it should be 'identifier' => '`', for M…
Comment by
WanWizard
December 2012
permalink
Could someone give me a hint on this relation limit?
rows_limit will only work on the query as a whole, not on a relation, as it will limit the entire query. if you want to use that, it has to be defined at the top level of the array, so the same level as 'where' and 'related'.
Comment by
WanWizard
December 2012
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,395
Last Active
July 6
Roles
Administrator