当前位置:网站首页>TP5 multi conditional where query (using PHP variables)
TP5 multi conditional where query (using PHP variables)
2022-04-23 03:03:00 【Stupid little attendant】
- Want to reference PHP Remember to use double quotation marks for variables
public function queryFullBoxFreight()
{
// Database table
$table = 'table_xxx';
$order_clause = input('order_clause','');
$order_start_place = input('order_start_place','');
$order_end_place = input('order_end_place','');
// Query the database
$wheres = [];
$wheres['fullBox_clause'] = array('like', "%$order_clause%");
$wheres['fullBox_start_place'] = array('like', "%$order_start_place%");
$wheres['fullBox_end_place'] = array('like', "%$order_end_place%");
$datas = Db::table($table)
->where($wheres)
->select();
// Return the data
return returnData::returnSuccess($datas);
}
版权声明
本文为[Stupid little attendant]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220630238752.html
边栏推荐
- Wepy learning record
- Résumé du gestionnaire de projet du système d'information Chapitre VI gestion des ressources humaines du projet
- Encapsulate components such as pull-down menu based on ele
- Navicat failed to connect to Oracle Database: cannot load OCI DLL, 87: instant client package is
- The express project changes the jade template to art template
- Kubernetes - detailed explanation of pod
- Response processing of openfeign
- The usage of case when and select case when is very easy to use
- Encapsulation of ele table
- C# 11 对 ref 和 struct 的改进
猜你喜欢

ASP.NET 6 中间件系列 - 自定义中间件类

tf. keras. layers. Timedistributed function

Assembly learning Chapter III of assembly language (Third Edition) written by Wang Shuang
![Niuke white moon race 5 [problem solving mathematics field]](/img/be/ca059bd1c84eaaaefa3266f9119a6b.png)
Niuke white moon race 5 [problem solving mathematics field]

Q-Learning & Sarsa

.NET点滴:说说Middleware构造中获取不到Scoped服务的问题

Plug in for vscode

BLDC double closed loop (speed PI + current PI) Simulink simulation model

腾讯视频涨价:一年多赚74亿!关注我领取腾讯VIP会员,周卡低至7元

Kubernetes - Introduction to actual combat
随机推荐
Wepy learning record
Thoughts on the 2022 national network security competition of the national secondary vocational group (only one idea for myself) - network security competition questions (9)
最通俗易懂的依赖注入之生命周期
@Usage and difference between mapper and @ repository
Basic workflow of CPU
Er and eer models
JSON data text
Encapsulate components such as pull-down menu based on ele
Use of MySQL command line client and common commands
[if you want to do a good job, you must first use its tools] Guide for downloading and using paper editing and document management (endnote, latex, jabref, overflow) resources
tf. keras. layers. MaxPooling? D function
Centos7 install MySQL 8 0
Sonic cloud real machine tutorial
Openfeign details show
Difference between relative path and absolute path (often asked in interview)
MAUI初体验:爽
腾讯视频VIP会员,周卡特价9元!腾讯官方直充,会员立即生效!
[hcip] detailed explanation of six LSAS commonly used by OSPF
The space between the left and right of the movie ticket seats is empty and cannot be selected
tf. keras. layers. Density function