Jump to content

alvin567

Members
  • Posts

    161
  • Joined

  • Last visited

Posts 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.   $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

  4. 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.

  5.     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

        }

  6. Notice (8): Undefined variable: url [APP\webroot\index.php, line 90] /** * CakePHP Component & Model Code Completion * @author junichi11 * * ============================================== * CakePHP Core Components * ============================================== * @property AuthComponent $Auth * @property AclComponent $Acl * @property CookieComponent $Cookie * @property EmailComponent $Email * @property RequestHandlerComponent $RequestHandler * @property SecurityComponent $Security * @property SessionComponent $Session */

    Warning (512): PHP SQL Server interface is not installed, cannot continue. For troubleshooting information, see http://php.net/mssql/ [CORE\cake\libs\model\datasources\dbo\dbo_mssql.php, line 121]

    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

     

    1)one more thing how do I format the quote?

  7. 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.