
Faster Query with `whereIntegerInRaw` Method
In this article we will learn about `wherein` and `whereIntegerInRaw`, both these methods are used to add a "where in" clause to your database queries.
whereIn Method
The `whereIn` method is typically used for standard queries where the column can be any data type (string, integer, etc.).
whereIntegerInRaw Method
The whereIntegerInRaw method is very useful where the column is an integer and you need a more efficient query.This method can be useful when you are working with a large set of integers.
Summary
- whereIn can handle various data types.
- whereIntegerInRaw is optimized for integer columns
- Use whereIn when you are dealing with columns that might not strictly be integers or when the set of values includes different data types.
- Use whereIntegerInRaw when you are sure that the column and the values are integers.