Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7041627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:04:08+00:00 2026-05-28T02:04:08+00:00

In cakephp, I used $rNo array in WHERE clause. $rooms =$this->find(‘all’,array( ‘conditions’=>array(NOT=>array(‘Room.id’=>$rNo)), ‘group’=>array(‘Room.room_type_id’))); Now,

  • 0

In cakephp, I used $rNo array in WHERE clause.

$rooms =$this->find('all',array(    
        'conditions'=>array("NOT"=>array('Room.id'=>$rNo)),
        'group'=>array('Room.room_type_id')));

Now, I wanan use query statment by using array in where clause.
How can I use? Please explain me!

SELECT * FROM room WHERE id = **array**

I wanna know about this array. How to use?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:04:09+00:00Added an answer on May 28, 2026 at 2:04 am

    Standard usage (don’t know about cakePHP much):

    SELECT * from `table` where `id` in (1,2,3,4,5)
    

    Be careful, check you PHP array is not empty because

    SELECT * from `table` where `id` in ()
    

    raises a MySQL error

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This used to work: $this->Model->find('all', array( 'fields' => 'Model.field/100 as name') but I now
the frameworks i've used (granted not that many.. pylons,cakephp,rails,etc) all seem to use a
I have seen in cakephp that foreach loop is used like this foreach($tags as
I used this tutorial: http://book.cakephp.org/2.0/en/tutorials-and-examples/blog-auth-example/auth.html To build my first form/create user app, but it
I had this kind of routes that used to work on cakePHP 1.2 Router::connect('/mycategory/my-region',
I recently started experimenting with CakePHP. I used this query in normal PHP and
I want to truncate my Database Table, with CakePHP Model, I have used $this->Model->deleteAll
How do you style the paginator with CSS used in CakePHP? I can't find
I have used ajax form submission in cakephp echo $ajax->submit('Submit', array('url'=> array('controller'=>'projects', 'action'=>'add_comment'), 'update'
I've used CakePHP a few times before but this is the first time I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.