Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Less than equal to query in codeigniter

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 4.93k
    Comment on it

    Hello reader's If you are using codeigniter and want to make '<=' mysql query then you can use the code syntax as below:-

    ->select('COUNT(payment.keyid) AS rec_count')   
    ->where('payment.paymentdate >=', $month_start)
    ->where('payment.paymentdate <=', $month_end)
    ->get()
    

    here you just have to add the line

      ->where('payment.paymentdate >=', $month_start)
    

    And similarly you can make joins or ordery by clauses also as example below:-

    ->select('product_key.client_name, product_key.contact_email, product_key.status, product_key.id, payment.paymentdate, (payment.id) as pid,payment.subscription_type')
    ->from('product_key')         
    ->join('payment', 'payment.keyid=product_key.id', 'left outer') 
    ->where('status', 'purchased')
    ->order_by('client_name', "asc")
    ->group_by('product_key.id')
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: