Comments (5)
PDO (and also Fluentpdo) has no support for arrays. So you need to escape these values manualy and add them directly into SQL query.
from fluentpdo.
FluentPDO does support arrays
$table->where("field", array("x", "y")) Translated to field IN ('x', 'y')
from fluentpdo.
However I don't think it supports it as named parameters used in the manner of
$table->where(
"value IN (:arrayName)",
array(
':arrayName'=>array("x", "y")
)
)
which would also be a nice feature
from fluentpdo.
I think he has problem with OR
I made like that
$query->where(array('LOWER(title) LIKE ? OR LOWER(body) LIKE ?' => array('test','test')));
BaseQuery:237
Before:
if (is_array($value) && is_string(key($value)) && substr(key($value), 0, 1) == ':') {
// this is named params e.g. (':name' => 'Mark')
$parameters = array_merge($parameters, $value);
}
After:
if (is_array($value)) {
// this is named params e.g. (':name' => 'Mark')
$parameters = array_merge($parameters, $value);
}
from fluentpdo.
I have this problem too
from fluentpdo.
Related Issues (20)
- Tables aliases broken ? HOT 3
- how i can use left join in foreach?
- PHP 8.0 support HOT 3
- Add params to SELECT method HOT 2
- Website not working HOT 1
- The select examples don't work HOT 1
- The ->fetchAll() can be used to put the result in a variable? HOT 1
- The fluent PDO passes parameters by "prepare" and "bindValue" to avoid sql injection? HOT 2
- Insert: lastval is not yet defined HOT 1
- Feature request: INSERT SELECT support
- PHP 8.1 Return type compatibility deprecation notices
- BETWEEN Method? HOT 2
- Undefined class constant 'PDO::FETCH_DEFAULT' HOT 1
- Excessive a.* clause HOT 3
- Use an object instead of an array for the update and insertInto function
- Error with %d format symbol inside select clause HOT 3
- Any news on 3.0? HOT 6
- Memory leak on multiple inserts/selects with big content HOT 1
- JSON data type support
- Cannot delete from tables with multiple primary keys HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluentpdo.