PHP和正则表达式 [英] PHP and Regular Expressions

查看:63
本文介绍了PHP和正则表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在MySQL版本3.23.41和4.0.10

中进行一个非常简单的查询,其中它将是这样的:


[ PHP]

$ sql =" SELECT * FROM image WHERE image_path LIKE

''%$ imageLocationPath / [a-zA-Z0-9 \\-_ \\。%] + \ $%''"

[/ PHP]


然而,我无法弄清楚去做这个。我去了各种在线

教程,包括 www.mysql.com 而且我很遗憾没有一个人能够有一点意义。有人可以帮我这个

非常简单的任务还是指点我怎么写这个怎么写

这个?


Thanx

Phil

I need to do a very simple query in MySQL versions 3.23.41 and 4.0.10
whereby it would be something like this:

[PHP]
$sql = "SELECT * FROM image WHERE image_path LIKE
''%$imageLocationPath/[a-zA-Z0-9\\-_\\.%]+\$%''"
[/PHP]

However, I can''t figure out how to do this. I went to various online
tutorials including www.mysql.com and I''m sorry not a single one of
them made an ounce of sense. Could someone please help me with this
very simple task or point me in the right direction as to how to write
this?

Thanx
Phil

推荐答案

sql =" SELECT * FROM image WHERE image_path LIKE

''%
sql = "SELECT * FROM image WHERE image_path LIKE
''%


imageLocationPath / [a-zA-Z0-9 \\-_ \\\\。%] + \
imageLocationPath/[a-zA-Z0-9\\-_\\.%]+\


%''"

[/ PHP]


但是,我无法弄清楚如何做到这一点。我去了各种在线

教程,包括 www.mysql.com 而且我很遗憾没有一个人能够有一点意义。有人可以帮我这个

非常简单的任务还是指点我怎么写这个怎么写

这个?


Thanx

Phil
%''"
[/PHP]

However, I can''t figure out how to do this. I went to various online
tutorials including www.mysql.com and I''m sorry not a single one of
them made an ounce of sense. Could someone please help me with this
very simple task or point me in the right direction as to how to write
this?

Thanx
Phil


这篇关于PHP和正则表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆