PHP+MS Access:通过 PHP 查询时通配符 * 被视为字符串?
以下是查询:
UPDATE test_5 SET test_5.[it/technical] ='tech' where test_5.[Application URL] like '*' & 'App' & '*'; (to update all Application URLs containing 'App')
运行时:
直接在 Microsoft Access 中:它可以正常工作并且可以正常运行。更新包含单词 APP 的
应用程序 URL
的所有记录,即应用程序等已更新作为通过PHP的查询:通配符< code>* 只是作为字符串的一部分,而不是通配符,因此它仅匹配
*App*
(读作starAppstar
);
尽快帮助我...
自过去两天以来一直坚持...
问候, 病毒性的
Here is the query:
UPDATE test_5 SET test_5.[it/technical] ='tech' where test_5.[Application URL] like '*' & 'App' & '*'; (to update all Application URLs containing 'App')
When ran :
directly in Microsoft Access: It works correctly & updates all the records with
Application URL
containing word APP, i.e. Applications etc. are updatedas a query through PHP: The wildcard
*
is taken simply as a part of the string, not a wildcard, thus it matches only*App*
(read itstarAppstar
);
Help me asap...
Stuck at it since last two days...
Regards,
Viral
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试阅读以下链接,似乎 * 不是 MS ACCESS 中的正确运算符......
http://forums.devarticles.com/microsoft-access-development-49/like-operator-not-working-with-ms-access-sql-queries-1992.html
另一个有用的链接:
http://www.mycsharpcorner.com/Post.aspx?postID=43
另请参阅:
http://www.codingforums.com/showthread.php?t=110190
这是我编写的用于查找上一个的 Google 查询超链接:
http://www.google.it/#sclient=psy&hl=it&source=hp&q=like+%2Bms+%2Baccess+%2Bphp&aq=f &aqi=&aql=&oq=&pbx=1&bav=on.2,or.r_gc.r_pw.&fp=bb1f5215b4cfdc3a&biw=1280&bih=598
try to read at the following link, it seems that * is not the right operator for like in MS ACCESS.........
http://forums.devarticles.com/microsoft-access-development-49/like-operator-not-working-with-ms-access-sql-queries-1992.html
Another useful link:
http://www.mycsharpcorner.com/Post.aspx?postID=43
See also this:
http://www.codingforums.com/showthread.php?t=110190
this is the google query i've written to find the previous hyperlinks:
http://www.google.it/#sclient=psy&hl=it&source=hp&q=like+%2Bms+%2Baccess+%2Bphp&aq=f&aqi=&aql=&oq=&pbx=1&bav=on.2,or.r_gc.r_pw.&fp=bb1f5215b4cfdc3a&biw=1280&bih=598
在 SQL 中
%
是通配符。检查这个In SQL
%
is the wildcard. Check this