Other difference,
I am using the $dataSource-_execute() inside a Controller, I untherstand
You want to use it inside a Shell.
Is this correct?, Is there a difference in environment?
Regards.
El 14 de octubre de 2009 09:27, Yuncong Zhang njit...@gmail.com escribió:
Thank you Jorge,
The
Yeah, I use it inside a Shell inheritance.
uses('model'.DS.'connection_manager');
$db = ConnectionManager::getInstance();
$dataSource = $db-getDataSource('default');
$sql = '*blahblah*';
$resultSrc = $dataSource-_execute($sql);
$results=array();
while($data=$dataSource-fetchResult())
{
I'm somewhat familiar with the schema stuff. However, the .sql file
is a file that's going to be provided to us and not a file that will
be generated by cake. Our .sql file isn't just about the schema, it
could be large amounts of data manipulation using sql. So unless the
schema stuff will
Hello,
I had a similar problem. I have an Install controller that executes a SQL
script in ordert to create the database.
What I have done is somethjing similar to:
uses('model'.DS.'connection_manager');
$db = ConnectionManager::getInstance();
$dataSource = $db-getDataSource('default');
// The
I'm trying to execute a bunch of sql from a .sql file from the
console. I was trying to use the query method inside the Model class,
but I keep getting the following error.
Error: Missing database table 'models' for model 'Model'
Below is my code:
?php
App::import('Core', array('Model'));
I think you want to create a schema
http://book.cakephp.org/view/735/Generating-and-using-Schema-files
- S
2009/9/23 Stinkbug justink...@gmail.com
I'm trying to execute a bunch of sql from a .sql file from the
console. I was trying to use the query method inside the Model class,
but I keep