Thank you for your interest and the posts...
OK, here you go..
Searching for the strings with a comma in the string using phpMyAdmin...
Code:
SELECT * FROM ViewNew WHERE LOCATE(',', `References`) > 0 AND LOCATE('". 30 Spindle 10: . "', `References`) > 0 AND ". 10 ." BETWEEN SUBSTRING_INDEX(SUBSTRING_INDEX(`References`, ':', -1), ',', 1) + 0 AND SUBSTRING_INDEX(`References`, ',', -1) + 0;
Result statement
Your SQL-query has been executed successfully (Query took 1.0198 sec) SQL-query:
SELECT *
FROM ViewNew
WHERE LOCATE( ',', `References` ) >0
AND LOCATE( '". 30 Spindle 10: . "', `References` ) >0
AND ". 10 ."
BETWEEN SUBSTRING_INDEX( SUBSTRING_INDEX( `References` , ':', -1 ) , ',', 1 ) +0
AND SUBSTRING_INDEX( `References` , ',', -1 ) +0
LIMIT 0 , 30
Searching for the strings with a dash in the string using phpMyAdmin...
Code:
SELECT * FROM ViewNew WHERE LOCATE('-', `References`) > 0 AND LOCATE('". 30 Spindle 10: . "', `References`) > 0 AND ". 10 ." BETWEEN SUBSTRING_INDEX(SUBSTRING_INDEX(`References`, ':', -1), '-', 1) + 0 AND SUBSTRING_INDEX(`References`, '-', -1) + 0;
Result statement...
SQL-query:
SELECT *
FROM ViewNew
WHERE LOCATE( '-', `References` ) >0
AND LOCATE( '". 30 Spindle 10: . "', `References` ) >0
AND ". 10 ."
BETWEEN SUBSTRING_INDEX( SUBSTRING_INDEX( `References` , ':', -1 ) , '-', 1 ) +0
AND SUBSTRING_INDEX( `References` , '-', -1 ) +0
LIMIT 0 , 30
Searching for the strings with a dash in the string AND a Source using phpMyAdmin...
Code:
SELECT * FROM ViewNew WHERE LOCATE('-', `References`) > 0 AND LOCATE('". 30 Spindle 10: . "', `References`) > 0 AND ". 10 ." BETWEEN SUBSTRING_INDEX(SUBSTRING_INDEX(`References`, ':', -1), '-', 1) + 0 AND SUBSTRING_INDEX(`References`, '-', -1) + 0 AND `Source` = 'BT';
Result statement...
Your SQL-query has been executed successfully (Query took 0.0075 sec) SQL-query:
SELECT *
FROM ViewNew
WHERE LOCATE( '-', `References` ) >0
AND LOCATE( '". 30 Spindle 10: . "', `References` ) >0
AND ". 10 ."
BETWEEN SUBSTRING_INDEX( SUBSTRING_INDEX( `References` , ':', -1 ) , '-', 1 ) +0
AND SUBSTRING_INDEX( `References` , '-', -1 ) +0
AND `Source` = 'BT'
LIMIT 0 , 30
Searching for the strings with a dash in the string AND another Source using phpMyAdmin...
Code:
SELECT * FROM ViewNew WHERE LOCATE('-', `References`) > 0 AND LOCATE('". 30 Spindle 10: . "', `References`) > 0 AND ". 10 ." BETWEEN SUBSTRING_INDEX(SUBSTRING_INDEX(`References`, ':', -1), '-', 1) + 0 AND SUBSTRING_INDEX(`References`, '-', -1) + 0 AND `Source` = 'TR';
Your SQL-query has been executed successfully (Query took 0.2002 sec) SQL-query:
SELECT *
FROM ViewNew
WHERE LOCATE( '-', `References` ) >0
AND LOCATE( '". 30 Spindle 10: . "', `References` ) >0
AND ". 10 ."
BETWEEN SUBSTRING_INDEX( SUBSTRING_INDEX( `References` , ':', -1 ) , '-', 1 ) +0
AND SUBSTRING_INDEX( `References` , '-', -1 ) +0
AND `Source` = 'TR'
LIMIT 0 , 30
The query statement line 1302 is...
Code:
$query = "SELECT * FROM ViewNew WHERE LOCATE('-', `References`) > 0 AND LOCATE('". 30 Spindle 10: . "', `References`) > 0 AND ". 10 ." BETWEEN SUBSTRING_INDEX(SUBSTRING_INDEX(`References`, ':', -1), '-', 1) + 0 AND SUBSTRING_INDEX(`References`, '-', -1) + 0 AND `Source` = $TR";
Error message generated by the above...
Parse error: parse error, unexpected T_STRING in /home/anysite/public_html/XP/RefGoTest7_Test11.php on line 1302
Now, if you substitute real values, known values that really exist in the db for the variables in the more complex statement (time and date stamped 1 Aug 05 10:20) in this thread...you get the same error message given for the time and date stamp 1 Aug 05 10:20 in this thread.