Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » getCount function throws error when sql statement starts with whitespace
Re: getCount function throws error when sql statement starts with whitespace [message #5873 is a reply to message #5866] Fri, 09 September 2016 21:27 Go to previous messageGo to previous message
kong is currently offline  kong
Messages: 90
Registered: December 2011
Member
That won't work, as it does not make changes to the $where variable.
Recommend this:

    function getCount ($where=null)
    // get count of records that satisfy selection criteria in $where.
    {
        $where = trim($where); 
        if (strlen($where) > 0) {
            $count = $this->_dml_getCount($where);
            return $count;
        } else {
            return 0;
        } // if

    } // getCount

[Updated on: Fri, 09 September 2016 21:29]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Radicore v1.95 - Postgresal 9.5.3 - System crash after pressing submit button
Next Topic: UPDATE1 scrolling skips validation after SubmitNext
Goto Forum:
  


Current Time: Wed Dec 04 14:47:00 EST 2024

Total time taken to generate the page: 0.04584 seconds