
alvin567
Members-
Posts
161 -
Joined
-
Last visited
Everything posted by alvin567
-
$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?
-
$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?
-
$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
-
COUNT(*) AS quantity,round(COUNT(*)*100.00/(Select COUNT(*) FROM claims),2,1), the problem is it keeps returning value like 17.33000000000000000000
-
SELECT COUNT(*) * 100/(Select COUNT(*) FROM claims AS Count But the problem is count always truncate the nearer integer value?!
-
How do I case 100 to 100.00 type in php?
-
hey,how do I remove this character using php? ascii character? , “X”
-
How do I go about doing so?
-
This couldn't be solved http://s1071.photobucket.com/albums/u515/flame_copper/?action=view¤t=Untitled-1.jpg
-
However there is an issues, when 1,10 then 11-19,I expect it to be pushed down to the end.
-
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.
-
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
-
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 }
-
First time using MS SQL (usually mysql) Help!!!
alvin567 replied to deansatch's topic in Microsoft SQL - MSSQL
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. -
How to post an array of checkbox values to web form in PHP?
alvin567 replied to Reckoner's topic in PHP Coding Help
there is also another way which is to trigger_error? -
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
-
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?
-
1)one more thing how do I format the quote?
-
my root directory and the snippet of code I post is here.
-
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
-
I know php,but my skills is 3/5 only.
-
[Cakephp] Notice: Constant CAKE_CORE_INCLUDE_PATH
alvin567 replied to alvin567's topic in Frameworks
Actually I solved the error already,I defined the error once more. -
My project is not locally,it is from the web servers,how do I change the variables?any ideas?
-
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); }