Jump to content

alvin567

Members
  • Posts

    161
  • Joined

  • Last visited

Everything posted by alvin567

  1. $claims = $this->Claim->find('all', array( 'fields' => array('Claim.id','Renewal.company_name', 'Claim.ref', 'Claim.reference', 'Claim.size', 'Claim.category', 'Claim.date_notified', 'Claim.incident', 'Renewal.year', 'Claim.claim_reserve_gross', 'Renewal.excess', 'Claim.claim_reserve_net', 'Claim.counsel_appointed', 'Claim.close_file_remarks', 'Claim.file_status', 'Claim.total_payment_indemnity','Claim.brief'), 'recursive' => -1, 'order' => 'Claim.reference ASC', 'conditions' => $conditions, 'joins' => array('INNER JOIN renewals AS Renewal ON ( Renewal.id = Claim.renewal_id ) ') )); Hi there,is it possible to get all fields from a tuple in cakephp?
  2. $practitioners = array('1' => 1, '2'=> 2,'3'=>3,'4'=>4,'5'=>5,'6'=>6 ,'7'=>7,'8'=>8,'9'=>'9','10'=>10,'11-19'=>'11-19','20-40'=>'20-40','Over 40'=>'Over 40' ); How do I search for values in associative array, search that when i find the value '1' and if it is founded I will push one column to the right?
  3. $this->_export Is derived from which package?
  4. $subquery = "SELECT size,CASE WHEN size <= 10 THEN CAST(size AS CHAR) WHEN size BETWEEN 11 AND 19 THEN '11-19' WHEN size BETWEEN 20 AND 40 THEN '20-40' WHEN size > 40 THEN 'Over 40' END AS size_group FROM claims WHERE created BETWEEN '$startdate' and '$enddate'"; $creationBetweenDateGroups = $this->Claim->query("SELECT practitioners,COUNT(*) AS quantity, round(COUNT(*)*100.00/(Select COUNT(*) FROM claims),2,0) WHERE created BETWEEN '$startdate' and '$enddate') AS Count FROM (".$subquery.") GROUP BY practitioners ORDER BY MAX(size) ASC; "); When i run this statement it returns the results
  5. COUNT(*) AS quantity,round(COUNT(*)*100.00/(Select COUNT(*) FROM claims),2,1), the problem is it keeps returning value like 17.33000000000000000000
  6. SELECT COUNT(*) * 100/(Select COUNT(*) FROM claims AS Count But the problem is count always truncate the nearer integer value?!
  7. How do I case 100 to 100.00 type in php?
  8. hey,how do I remove this character using php? ascii character? , “X”
  9. How do I go about doing so?
  10. This couldn't be solved http://s1071.photobucket.com/albums/u515/flame_copper/?action=view&current=Untitled-1.jpg
  11. However there is an issues, when 1,10 then 11-19,I expect it to be pushed down to the end.
  12. I have downloaded sqlsrv from microsoft, There are two versions,sqlsrv20 and sqlsrv30 I drop php_sqlsrv_53_ts_vc9.dll on C:\xampp\php\ext I commented : extension=php_sqlsrv_53_ts_vc9.dll I am using wamp server I am using phpversion 5.3.8 How do i go to phpinfo to see if it has been activated or not.
  13. It still ain't working even when I uncommented C:\xampp\php\php.ini 17 minutes ago I was referring to this part of the post here it says: http://stackoverflow.com/questions/3921707/cakephp-error-when-trying-to-use-mssql-datasource So I uncommented and downloaded here.extension=php_sqlsrv_53_ts_vc9.dll but it still doesn't work
  14. function __construct($config, $autoConnect = true) { 119 if ($autoConnect) { 120 if (!function_exists('mssql_min_message_severity')) { 121 trigger_error(__("PHP SQL Server interface is not installed, cannot continue. For troubleshooting information, see http://php.net/mssql/", true), E_USER_WARNING); 122 } 123 mssql_min_message_severity(15); 124 mssql_min_error_severity(2); 125 } 126 return parent::__construct($config, $autoConnect); 127 }
  15. You have to be sure about the version of mssql you are using. I use the wrong version like 2008 and when the server is 2005 and ended up I have to reinstall everything from scratch again. You need to ip address of the host for it to work.
  16. there is also another way which is to trigger_error?
  17. http://php.net/manual/en/ref.pdo-sqlsrv.php Ok,I have founded this driver. Now how do I changed the parameter of the of the php.ini so that it allows the connection. I am using wamp btw. This was actually the topic that I have founded to be relevant. http://www.phpfreaks.com/forums/index.php?topic=325480.0
  18. The main error is Fatal error: Call to undefined function mssql_min_message_severity() in C:\xampp\htdocs\lawsocscheme\cake\libs\model\datasources\dbo\dbo_mssql.php on line 123 is there anyway?mssql driver anything?
  19. 1)one more thing how do I format the quote?
  20. my root directory and the snippet of code I post is here.
  21. TS:This is one of the better concept I have read,too bad w3school school is at the top of the page. http://www.tutorialspoint.com/php/php_object_oriented.htm
  22. I know php,but my skills is 3/5 only.
  23. Actually I solved the error already,I defined the error once more.
  24. My project is not locally,it is from the web servers,how do I change the variables?any ideas?
  25. How about this error? if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); } How do I handle this error? if (!include(CORE_PATH . 'cake' . DS . 'bootstrap.php')) { trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR); }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.