Problem on view from custom sql

2012-11-09 Thread suttipong Pratum

Dear All

  i have problem for show on viewbecause  custom sql  

this  custome sql  

$querys = select * from registers where id is not null and (phone like 
'%$q%' ;
$querys .=  or endyear like '%$q%' ;
$querys .=  or address like '%$q%';
$querys .=  or name like  '%$q%' ;
$querys .=  or studentCode like '%$q%' ) ;
$searchs = $this - Register - query($querys);
 
$this - set(compact('searchs'));

and view   have error   : 

Undefined index: studentCode


?php foreach ($searchs as $register):
?
tr
td?= $register['studentCode']; ?/td
 
/tr
?php endforeach; ?

plz guide me  

thank you

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




Re: How can i edit a record?

2012-10-22 Thread suttipong Pratum
  u must show  filed id  in  edit view page  or  hidden filed   when 
submit   and call  save()   cakephp auto  update


  ? ??  pk  ??? table  hidden filed  
??? view ?? ? sumit  controller 
???  new data 

   

? ? 21 ?? ?.?. 2012, 4 ?? 14  49 ?? UTC+7, 
Nattapong Suwansukho :

 I cannot update a record and i don't know why. Pls see the pictures below 
 and suggest me , if i did something's wrong.
 *sorry for not good in English.



 https://lh5.googleusercontent.com/-CpckbkeuJ7w/UIMTsrmb3mI/BTY/36R1fVzq0HU/s1600/Screenshot+from+2012-10-21+04%3A03%3A43.pnghttps://lh5.googleusercontent.com/-CpckbkeuJ7w/UIMTsrmb3mI/BTY/36R1fVzq0HU/s1600/Screenshot+from+2012-10-21+04%3A03%3A43.pnghttps://lh4.googleusercontent.com/-EuGHk1hWkgw/UIMT6L-MtNI/BTg/3-dleV8l7bc/s1600/Screenshot+from+2012-10-21+04%3A06%3A38.png


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.




cakePHP 2.0 read rss feed

2012-08-12 Thread suttipong Pratum

   i try  to read  rss feed from   
http://kurinchilamp.kurinchilion.com/2009/06/cakephp-parsing-rss-feed-in-simple-steps.html
   
then  error 

*Error: * Class 'XML' not found 
*File: * /home/pos/cakeProject/XXX/app/Controller/FeedsController.php 
*Line: * 11

XMl  not found 


this my  controller 

?php
class FeedsController extends AppController {
   
 
var $feed_url = http://kurinchilamp.kurinchilion.com/feed;;
var $rss_item = array();


function read() {
 App::import('Xml');
$parsed_xml = new XML($this-feed_url);
// xml to array conversion
$this-rss_item = $parsed_xml-toArray();
$this-set('data', $this-rss_item['Rss']['Channel']['Item']);
}
}


tell to fix  this  error  .


thanl you 

-- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.




How to call css with ie6 or ie7

2012-08-07 Thread suttipong Pratum
How to coding css with cakePHP  

 
  
  !--[if IE 6]link rel=stylesheet href=style.ie6.css type=text/css 
media=screen /![endif]--

  !--[if IE 7]link rel=stylesheet href=style.ie7.css type=text/css 
media=screen /![endif]--


thank you 

sodaZa

-- 
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 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php