gpt4 book ai didi

php mysql查询字符串数组

转载 作者:行者123 更新时间:2023-11-29 01:15:15 24 4
gpt4 key购买 nike

<分区>

我正在构建一个在 mysql 数据库中检查的字符串。

eg:
formFields[] is an array - input1 is: string1
array_push(strings, formFields)
1st string and mysql query looks like this:
"select * from my table where id in (strings)"

formFields[] is an array - input2 is: string1, string2
array_push(strings, formFields)
2nd string and mysql query looks like this:
"select * from my table where id in (strings)"

formFields[] is an array - input3 is: string1, string2,string3
array_push(strings, formFields)
3rd string and mysql query looks like this:
"select * from my table where id in (strings)"

我想在数组中添加单引号和一个逗号,这样我就有了数组字符串:“从我的表中选择 *,其中 id 在 ('string1', 'string2','string3') 中”

我尝试使用数组内爆,但仍然没有任何想法?谢谢

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com