Fatal error: Call to undefined function mysql_connect() in
/opt/lampp/htdocs/cake/cake/libs/model/datasources/dbo/dbo_mysql.php on line 370
//shell
<?php
class ReportShell extends Shell
{
var $uses = array('Customer');
function main()
{
$customers = $this->Customer->find('all');
var_dump($customers);
$this->out('lol my first CakePHP shell is baked');
}
}
?>
//model
<?php
class Customer extends AppModel
{
var $name = "Customer";
var $useTable = "customer";
var $hasMany = array
('CustomerPrice',
'Order' => array('foreignKey' => 'customer_id'));
// Validation settings
var $validate = array(
'customer_id' => array(
'rule' => 'numeric',
'message' => …
Run Code Online (Sandbox Code Playgroud)