On Tue, Oct 18, 2011 at 7:07 PM, José Lorenzo wrote:
> Use try-catch.
> Alternatively, override save() in AppModel and tor try { parent::save()}
> catch (Exception $e) { //do something }
For some reason I have not thought about that: thank you so much!
Regards,
Matteo
--
http://www.matteoland
Use try-catch.
Alternatively, override save() in AppModel and tor try { parent::save()}
catch (Exception $e) { //do something }
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
Hi Yocto,
a few months ago, i write a little and simple app using Cake and Javascript
to list the countries.
A link for download is in my personal site (
http://www.thiagopaes.com.br/files/mundo.tar.gz)
Use and read the code, it is simple to understand.
I hope that helps,
Thiago
---
On Sun, F
You only need to configure your config/database.php, as follows:
var $default = array(
'driver' => 'sqlite',
'database' => 'path/to/sqlite/file.db'
);
If the file is relative to your app path, you may need to declare the
constructor in the DATABASE_CONFIG class and use the path con
Whoops this is the correct schema:
CREATE TABLE Tasks(
id INTEGER SIGNED AUTO_INCREMENT,
name TEXT,
notes TEXT,
due_date_month INTEGER(2),
due_date_day INTEGER(2),
due_date_year INTEGER(4),
status_id INTEGER NOT NULL REFERENCES Statuses(id),
Alexandr and Wayne ! you saved my life!!
Thanks so much.. it's so simple I feel confused ^_^
I did not look closer to the spelling (and may have been tired of
breaking my teeth)
The trick is just to define the type of 'id' as INTEGER instead of
INT (and to set it as PRIMARY)
This is somet
In my applications, that i have using sqlite 2, add this solution:
app_model:
function getNextId()
{
$_max = $this->query("SELECT (MAX(id) + 1) AS id FROM
{$this->table}");
$max = $_max[0][0]['id'];
return ceil($max);
}
and, in for example, photos_controller.p
That's "easy"? Sounds like a ridiculously over-complex idea to me...
On Oct 25, 2:01 pm, Adwin Wijaya <[EMAIL PROTECTED]> wrote:
> The easiest one :)
>
> create a table called counter with 2 field (or one,. deppend on you)
> create table tcounter
> :ctrtype "nameoftable"
> :ctrvalue 0
>
> when
The easiest one :)
create a table called counter with 2 field (or one,. deppend on you)
create table tcounter
:ctrtype "nameoftable"
:ctrvalue 0
when you want to save (inserting) ... get the ctrvalue from the
tcounter first, and then insert the ctrvalue into your table :id
(primary key). dont fo
David... read the URL you sent again, specifically:
If a table contains a column of type INTEGER PRIMARY KEY, then that
column becomes an alias for the ROWID. You can then access the ROWID
using any of four different names, the original three names described
above or the name given to the INTEGER
You can have auto-incremented columns with SQLite.
Define a single integer column as primary key and that should do the job.
On 10/25/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> Hello all!
>
> I'm a re-newly cake user and I'm currently trying to make my cake
> using a SQLite database.
Thanks AD7six. Here's the post again:
Hi bakers.
I'm starting to build a small database-driven website and was planning
to use SQLite for the backend. For what i can see in the code and
searching through this group only SQLite 2 support is available in
Cake. I've searched Trac for SQLite 3 suppo
On Sep 8, 12:57 pm, "Pisinho" <[EMAIL PROTECTED]> wrote:
> HI,
> I find a good Editor for develop with PHP5 and Cake.
> What software are you use for Syntax Highlighting, Code Hint, Code Insight,
> automatic Code Completion ?
>
> Thanks.
>
> S.S.
I really like thread hijacking...
Goncalo, don'
Alex,
try to install the php-sqlite module, which i think its available as
an rpm for fedora.
Once installed, verify it in your php if it is loaded as a php module
by doing the ff command
in your console. either (bash/csh).
$php -m | grep sqlite or just
$php -m
-- if you see sqlite then your good
apoligies... i'm running fedora core 6 and it would seem that php5 is
installed without sqlite. yes, i feel dumb...
i'm now getting the error:
Warning: sqlite_popen() [function:sqlite-popen]: file is encrypted or
is not a database
any thoughts?
On Mar 8, 3:17 pm, "Chris Hartjes" <[EMAIL PROTE
On 3/8/07, AzenAlex <[EMAIL PROTECTED]> wrote:
>
Here's my suggestion:
* Go make sure that your installed version of PHP has SQLite support
* Go and make sure SQLite is actually installed
If both those things are true, then come back and this problem can be
escalated to the next level.
Don't *g
I think the "extension=php_sqlite.dll" line only applies to windows
installations
On Mar 8, 11:23 am, "jmn2k1" <[EMAIL PROTECTED]> wrote:
> You should assure that the "extension=php_sqlite.dll" line in your
> php.ini is uncommented..
>
> On Mar 8, 12:42 pm, "AzenAlex" <[EMAIL PROTECTED]> wrote:
>
You should assure that the "extension=php_sqlite.dll" line in your
php.ini is uncommented..
On Mar 8, 12:42 pm, "AzenAlex" <[EMAIL PROTECTED]> wrote:
> sorry about the spam... i'm a little new to the groups and i though my
> post weren't working so i kept re-submitting...
>
> I'm running php 5.1.
sorry about the spam... i'm a little new to the groups and i though my
post weren't working so i kept re-submitting...
I'm running php 5.1.6 on linux so i'm guessing sqlite is already
there. is there some configuration i can check to make sure it's
enabled or something of that nature?
On Mar 7,
SQLite support is only available for PHP5, and you have to make sure
PHP is installed with it. See here: http://php.net/sqlite
On Mar 7, 6:13 pm, "AzenAlex" <[EMAIL PROTECTED]> wrote:
> Does cakephp support SQLite? I'm getting the impression it does
> however i've had no luck using it. my databa
STOP SPAMMING Please. We got 4 messages with the same content, and different
subject. One time is enough.
-MI
---
Remember, smart coders answer ten questions for every question they ask.
So be smart, be cool, and share you
'driver' => 'sqlite',
'database' => '/path/to/database/file'
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Cake PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this
22 matches
Mail list logo