gpt4 book ai didi

php - 查询在 MySQL Workbench 中运行但不在 php 中的 mysql_query() 中运行

转载 作者:行者123 更新时间:2023-11-29 04:55:38 25 4
gpt4 key购买 nike

select t1.* 
from bbs_product as t1, bbs_category as t2
where
(((t1.product_name_de like '%13"%') or
(t1.sku_number like '%13"%') or
(t1.description like '%13"%')) and
((t1.product_name_de like '%Laptoptasche%') or
(t1.sku_number like '%Laptoptasche%') or
(t1.description like '%Laptoptasche%')) and
((t1.product_name_de like '%im%') or
(t1.sku_number like '%im%') or
(t1.description like '%im%')) and
((t1.product_name_de like '%Buchdesign%') or
(t1.sku_number like '%Buchdesign%') or
(t1.description like '%Buchdesign%'))) and
(t1.category_id=t2.id and t2.status=1) and
t1.status=1 and
t1.discontinued='no' and
t1.is_secret='n'

最佳答案

t1.sku_number like '%13"%') or 
(t1.description like '%13"%')) and

您的查询文本中有双引号。

确保它们在作为 mysql_query 参数的 PHP 字符串中正确转义。

关于php - 查询在 MySQL Workbench 中运行但不在 php 中的 mysql_query() 中运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6761930/

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