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
[solved]how can I add my custom class in fuelphp ?
Note that it s not required to define anything for classes in app, they will be found without add_classes() too. Adding them like this will only save a file_exists() check as the autoloader doesn't have to check if it exists.
Comment by
WanWizard
December 2012
permalink
Tutorial repository
And I've committed the PR. Thanks!
Comment by
WanWizard
December 2012
permalink
oil seems to be mysql centric
It's the DB layer, that was originally ported from Kohana, and in this case the DBUtil methods, that are MySQL centric. Regular DB access, via PDO, works fine. The current layer doesn't allow for an easy fix, which is why we're going…
Comment by
WanWizard
December 2012
permalink
Getting a primary key error trying to create a Model
Ok, that's good. So the Model is in a new state, and should INSERT the data without problems. Are you sure the error is generated by this model, and not by a related model? The most common cause for this issue is that you have defined a PK as …
Comment by
WanWizard
December 2012
permalink
Pagination sample ?
That snippit of code requires you to setup a theme, which contains the views your going to use. Did you do that? He probably also has some means of passing $this->data to the theme, which isn't in this snippet. If you're new to Fuel it…
Comment by
WanWizard
December 2012
permalink
Getting a primary key error trying to create a Model
What do you mean "actual PK"? Every model has to define a PK, it doesn't have to be an auto-increment field. It's perfectly fine to provide the key yourself. What does is_new() return before you save()?
Comment by
WanWizard
December 2012
permalink
front controller best practice
There are several ways to go about this. Most people create a base controller, which will define the template and the fixed sections of the page, and have controllers that extend this base controller, and which fills in the body section of the temp…
Comment by
WanWizard
December 2012
permalink
[solved]how can I add my custom class in fuelphp ?
Dump it into classes and use it?
Comment by
WanWizard
December 2012
permalink
Using the curl driver of the Request class
The Request class is designed to return a response, so this is the correct way of doing things.
Comment by
WanWizard
December 2012
permalink
Getting a primary key error trying to create a Model
It says ["id"]=> string(7) ""So it sees a string 7 long, yet it doesn't display anything?
Comment by
WanWizard
December 2012
permalink
URL key for themes and data
If you use database backed routing, the best thing to do is add a generic route that routes all requests to your "lookup" controller, and have that do an HMVC request to the destination found (or throw an HttpNotFoundException if not). It …
Comment by
WanWizard
December 2012
permalink
Syntax error - "UPDATE users SET UserFirstName = WHERE UserId = " (ORM, SQL Anywhere)
Check out core/classes/database/query/builder/.php. The _compile_set() method will construct the SET part of the UPDATE query, you can check if you still have valid data at that point.
Comment by
WanWizard
December 2012
permalink
Pagination sample ?
echo \Pagination::create_links(); if you use the default instance, or pass the instance ($pagination in the above example) to the view, and use echo $pagination->render();
Comment by
WanWizard
December 2012
permalink
Getting a primary key error trying to create a Model
Which version of Fuel are you running? What is the result of var_dump($model_facebook->is_new()); before the save()?
Comment by
WanWizard
December 2012
permalink
Syntax error - "UPDATE users SET UserFirstName = WHERE UserId = " (ORM, SQL Anywhere)
The only think I can think of is that it's ODBC related, I don't have a Windows box here, nor SQL anywhere, so I can't debug it for you. Start in Database_PDO_Connection::query(), and work your way back.
Comment by
WanWizard
December 2012
permalink
Orm\Observer_UpdatedAt
Observers run on the model they are defined in. if you define a many-many with a through table, there is no model for that table, so no observers to run. If you want this, you need to define a model for it, and split the relation into two many-one&…
Comment by
WanWizard
December 2012
permalink
Syntax error - "UPDATE users SET UserFirstName = WHERE UserId = " (ORM, SQL Anywhere)
The PDO driver is a generic driver, and used by default in every app. The Query Builder, that is responsible for generating all SQL, is the same for all database drivers. So I doubt it has a bug this big, the forum would be flooded. Did you extend…
Comment by
WanWizard
December 2012
permalink
Future of ORM and query builder; new project advice
Re item 1: The current QB is ported from Kohana and improved slightly. It's very MySQL oriented, which is an issue when it comes to database portability. Which is why we're going to replace it with a new one already build, called 'c…
Comment by
WanWizard
December 2012
permalink
Session flash variable is not 'deleted'
This can be anything. You get this error when you have an exception in the Exception handler. PHP bug that's been there a long time.
Comment by
WanWizard
December 2012
permalink
Saving Search Result for Pagination
That's what I do.
Comment by
WanWizard
December 2012
permalink
What is best way to extend Orm and Fieldset behavior for custom select options?
Looked at the code again. The fieldset is the first parameter of set_form_fields(), and it is always passed. So you should be able to access the fieldset both before and after the model's fields have been added.
Comment by
WanWizard
December 2012
permalink
Session flash variable is not 'deleted'
I don't understand what the problem is. Your flash message keeps on displaying?
Comment by
WanWizard
December 2012
permalink
Config::set turn on profiling from controller
Huh? I explained in my previous post how to enable the profiler after the facts. The profiler has no option to disable it once it's running.
Comment by
WanWizard
December 2012
permalink
Looking to override package files/classes
I only use it to trigger a jQuery function. You can do in that what you want.
Comment by
WanWizard
December 2012
permalink
What is best way to extend Orm and Fieldset behavior for custom select options?
The fieldset object is returned after you have called the parent, so you can use that.
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