我有这样的条件,即应收回所有满足特定reg状态的浏览器:
country REGEXP ( ^(USA|Italy|France)$ )
然而,我需要增加一种模式,以收回所有空白的国家价值。 目前,我正在使用这一条件。
country REGEXP ( ^(USA|Italy|France)$ ) OR country = ""
如果不列入《儿童权利公约》条款,如何发挥同样的作用?
Thanks, Erwin
我有这样的条件,即应收回所有满足特定reg状态的浏览器:
country REGEXP ( ^(USA|Italy|France)$ )
然而,我需要增加一种模式,以收回所有空白的国家价值。 目前,我正在使用这一条件。
country REGEXP ( ^(USA|Italy|France)$ ) OR country = ""
如果不列入《儿童权利公约》条款,如何发挥同样的作用?
Thanks, Erwin
这一工作应当:
country REGEXP ( ^(USA|Italy|France|)$ )
然而,从业绩角度看,你可能希望利用IN syntax。
country IN ( USA , Italy , France , )
由于区域评价方案可能相当缓慢,以后应该更快。
您没有理由使用
它看上去了一个微薄的圆形,但country REGEXP (^USA, Italy, Kluwer( )/code>将工作。
你可以尝试:
country REGEXP ( ^(USA|Italy|France|)$ )
我在France
后添加了另一个 >/code>,该编码应基本上将其贴在
>>>>^$
上,该编码与country =
相同。
<>Update:,因为这一方法没有工作,我建议你使用这一规定:
country REGEXP ( ^(USA|Italy|France)$|^$ )
请注意,您可以使用:^(USA Kluwer, Kluwer,{0})$
,因为它会抱怨说,有空话。 虽然>>(USA Kluwer) ,|.{0}$
将有效。
这里有一些例子说明这一规定的收益价值:
select regexp ^(USA|Italy|France)$|^$
> 1
select abc regexp ^(USA|Italy|France)$|^$
> 0
select France regexp ^(USA|Italy|France)$|^$
> 1
select regexp ^(USA|Italy|France)$|^$
> 0
你可以看到,这完全是你想要的。
如果你想要将空白值(如0个空间和5个空位都算作空白)对待,那么你就应当使用reg:
country REGEXP ( ^(USA|Italy|France|s*)$ )
这将使上个例子中的最后一行不同,即:
select regexp ^(USA|Italy|France|s*)$
> 1
I noticed that there were some threads with similar questions, and I did look through them but did not really get a convincing answer. Here s my question: The subquery below returns a Table with 3 ...
<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...
我把我的用心从使用QQL转向MySQL。 它与凯科特合作,现在不工作,因为我已经改变,使用MySQL。 这里的错误信息是:
We have a restaurant table that has lat-long data for each row. We need to write a query that performs a search to find all restaurants within the provided radius e.g. 1 mile, 5 miles etc. We have ...
Is it possible in php to return a specific row of data from a mysql query? None of the fetch statements that I ve found return a 2 dimensional array to access specific rows. I want to be able to ...
Our website was developed with a meta tag set to... <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> This works fine for M-dashes and special quotes, etc. However, I ...
What are some of the strategies being used for pagination of data sets that involve complex queries? count(*) takes ~1.5 sec so we don t want to hit the DB for every page view. Currently there are ~...
My table looks like person_id | car_id | miles ------------------------------ 1 | 1 | 100 1 | 2 | 200 2 | 3 | 1000 2 | 4 | 500 I need to ...