On 13 August 2010 08:47, win.a wrote:
> Its was picked from drupal source code and i don't know how does it works.
> This is the code :
> preg_match('/^\[?(?:[a-z0-9-:\]_]+\.?)+$/', $host);
This has got nothing to do with php or php-db - your question is on
regular expressions. Try consulting
htt
Its was picked from drupal source code and i don't know how does it works.
This is the code :
preg_match('/^\[?(?:[a-z0-9-:\]_]+\.?)+$/', $host);
After followed the regular syntax ,i try to cut it into pieces to make
it simpler to
understand ,
part a1: ^\[?
part a2:([a-z0-9-:\]_]+\.?)+$
Then go o
On 13/08/10 13:26, Ron Piggott wrote:
If the variable $segment has an ' in it the $query won't work because of
having 3 ' 's.
Should I be using:
$segment = mysql_real_escape_string($segment);
before querying the database?
Use it in your query. Don't use it anywhere else. Your code may use it
If the variable $segment has an ' in it the $query won't work because of
having 3 ' 's.
Should I be using:
$segment = mysql_real_escape_string($segment);
before querying the database?
$query="SELECT `reference` FROM `bible_concordance_words` WHERE `word` =
'$segment' LIMIT 1";
Please note: $s