For me it looks like a problem with mod_rewrite, look on http://m.gratuito24.com/index.php/ads/index/showAds:goods/language:bg.html, index.php part is important, first thought: no mod_rewrite on server, second: something wrong with .htaccess...
cakephp,cakephp-2.0,cakephp-1.3,cakephp-2.1,cakephp-2.3
updateAll() does not automatically wrap string values in quotes unlike when using save(). You have to do this yourself. From the docs:- Literal values should be quoted manually using DboSource::value(). You need to wrap each string value in $this->request->data with quotes using something like the datasource's value() method before calling...
cakephp,cakephp-2.0,cakephp-1.3,cakephp-2.1,cakephp-2.3
Use below query $rs = $this->Item->find('all' , array ('fields' => array('Max(Item.no) as no'))); This query will return max number in below format Array ( [0] => Array ( [no] => 27 ) ) $max = $rs[0]['no']; ...
If you got the ID, and you are auto_incrementing the ID in your database, you can count row before this ID: $nbRow = $this->Item->find('count', array('conditions' => array('id <=' => $id))) ; Then to find the page, you just have to divide (int division) by the number of item per page:...
php,mysql,arrays,cakephp,cakephp-1.3
That is the expected result. You are working against the ORMs auto-magic. Passing a string will result in an equality comparison, ie WHERE x = y, and since id is most probably an integer, the casting will turn the string 1,2,3,4 into 1, so ultimately the condition will be WHERE...
cakephp,migration,cakephp-2.0,cakephp-1.3
Check the source The error message comes from the dispatch function: public function dispatch(CakeRequest $request, CakeResponse $response, $additionalParams = array()) { if ($this->asset($request->url, $response) || $this->cached($request->here)) { return; } $request = $this->parseParams($request, $additionalParams); Router::setRequestInfo($request); $controller = $this->_getController($request, $response); if (!($controller instanceof Controller)) { throw new MissingControllerException(array( # line 83 'class'...
<form action="/project_name/users/add" id="UserAddForm" method="post"> First name:<br> <input type="text" name="data[User][firstname]"><br> Last name:<br> <input type="text" name="data[User][lastname]"><br> <input type="submit" value="Submit"> </form> I think this not recomended solution Use these keys if you need to inject some markup inside the output of the input() method: echo $this->Form->input('field', array( 'before' => '--before--', 'after' => '--after--',...
cakephp,cakephp-2.0,cakephp-1.3,cakephp-2.3,mysql-real-escape-string
I don't know cake php, but IMHO, you just cannot use mysql_real_escape_string, because: firstly, it is deprecated. This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQL extension should be used. secondly, according to php doc : The MySQL connection....
Your first error is because /home/SOME_NAME/public_html/OLD_DOMAIN_NAME/tmp/cache/ is not writeable. Make sure that tmp has the correct file permissions; it needs to be writeable by the web server user. Otherwise your issue appears to be that the database config is wrong so the app cannot connect to the database. Check app/config/database.php...
the following code adds N/A option echo $this->Form->input('dob', array('type' => 'date', 'empty' => array('Select','N/A'), 'label' => 'Birthday', 'dateFormat' => 'MDY', 'minYear' => date('Y') - 120, 'maxYear' => date('Y'), 'selected' => array('month' => '','day' => '', 'year' => '')));...
cakephp,internationalization,cakephp-1.3
There shouldn't be any HTML markup in the string you want to translate. So you want to put your <span> tags in the replacement text:- <?= sprintf( __('bla bla bla %s bla', true), '<span id="count">' . $count . '</span>' ); ?> This will give you bla bla bla %s bla...
cakephp,cakephp-2.0,cakephp-1.3,cakephp-2.3
It looks like you are trying to update a record in your Client model based on the email and client type because (I assume) you don't know the id. Try changing your code to get the id based on the information you have- public function editProfile(){ if($this->request->is('get')) { if (isset($this->data)){...
The required PHP version is: PHP 4.3.2 or greater Please see the official site to see any other requirement: http://book.cakephp.org/1.3/en/The-Manual/Developing-with-CakePHP/Requirements.html...
php,mysql,cakephp,database-design,cakephp-1.3
It sounds like you're trying to implement a Temporal Database. Temporal support was one of the major additions to the ANSI/ISO SQL:2011 standard. MySQL (like most RDBMS) lags behind the standard. Think of Temporal Database as the DBMS equivalent of CVS/SVN/Git. By contrast, the traditional database we use without temporal...
cakephp,cakephp-2.0,cakephp-1.3,cakephp-2.1,cakephp-2.3
First you have to unbindModel because you are already bind Employee model in Store model that's why it conflict with your Model. public function index(){ $this->Store->unbindModel( array('belongsTo' => array('Employee')), true ); $options=array( 'joins' => array( array( 'table' => 'Employee', 'alias' => 'Employee', 'foreignKey' => true, 'conditions'=> array('Employee.employee_store = Store.store_name') )...
php,mysql,sql,cakephp-1.3,concat
Here is the condition, I found working for me: $conditions = array("CONCAT(`hours`,':',`minutes`) <=" => date('H:i', strtotime('+1 hour')), "CONCAT(`hours`,':',`minutes`) >=" => date('H:i')); Hope it helps to the community members ! Suggestions always welcome....
php,url,cakephp,get,cakephp-1.3
From the Cakephp 1.3 book: URL: /contents/view/chapter:models/section:associations Mapping: ContentsController->view(); $this->passedArgs['chapter'] = 'models'; $this->passedArgs['section'] = 'associations'; $this->params['named']['chapter'] = 'models'; $this->params['named']['section'] = 'associations'; So you should use: $this->params['named']['name1'] $this->params['named']['name2'] ...
Joins will definitely work but it will be very inefficient if you do not cache your query... Now try this- $options['joins'] = array( array( 'table' => 'role_members', 'alias' => 'RoleMember', 'type' => 'INNER', 'conditions' => array( 'RoleMember.user_id = User.id' ) ), array( 'table' => 'roles', 'alias' => 'Role', 'type' =>...
It was due to invalid SMTP settings. I have detected it and solved it.
twitter-bootstrap,cakephp,cakephp-1.3
Your output code is not good structured. Move echo $this->Form->end(); after last closing div tag </div>...
cakephp,cakephp-2.0,cakephp-1.3,cakephp-2.1,cakephp-2.3
$options = array( array( 'table' => 'Employee', 'alias' => 'Employee', 'foreignKey' => true, 'conditions'=> array('Employee.employee_store = Store.store_name') ) ); $coupons = $this->Store->find('all',array( "fields"=>array("Employee.*","Store.*"), "joins"=>$options )); ...
To be expected CakePHP only returns what the underlying driver returns, as such it is Db-dependent, but if you're observing all values are strings then yes, it should be that way. For example, using the mysql driver results are always returned as strings: <?php mysql_connect("localhost", "user", "pass"); $resource = mysql_query("select...