开发者

PHP+MS Access: Wildcard * being taken as a string when querying through PHP?

开发者 https://www.devze.com 2023-03-17 17:39 出处:网络
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\')

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 updated

  • as a query through PHP: The wildcar开发者_运维知识库d * is taken simply as a part of the string, not a wildcard, thus it matches only *App*(read it starAppstar);

Help me asap...

Stuck at it since last two days...

Regards, Viral


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


In SQL % is the wildcard. Check this

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号