BamaStangGuy
10-28-2007, 07:49 AM
I am running this query:
$result_date = $vbulletin->db->query_read("
SELECT DISTINCT
z.tag, COUNT(*) AS total_lyrics
FROM " . TABLE_PREFIX . "zoints_tag AS z
LEFT OUTER JOIN " . TABLE_PREFIX . "thread AS t
ON z.threadid = t.threadid
WHERE t.forumid = 34 AND z.tag REGEXP '^[0-9]'
GROUP BY z.tag
ORDER BY z.tag
");
With the goal of retrieving every tag that starts with 0-9. I have one tag in there right now that starts with a 3, '3 doors down'.
However the above query does not return any results. Is that the correct format and if so what would be causing it to return nothing at all?
$result_date = $vbulletin->db->query_read("
SELECT DISTINCT
z.tag, COUNT(*) AS total_lyrics
FROM " . TABLE_PREFIX . "zoints_tag AS z
LEFT OUTER JOIN " . TABLE_PREFIX . "thread AS t
ON z.threadid = t.threadid
WHERE t.forumid = 34 AND z.tag REGEXP '^[0-9]'
GROUP BY z.tag
ORDER BY z.tag
");
With the goal of retrieving every tag that starts with 0-9. I have one tag in there right now that starts with a 3, '3 doors down'.
However the above query does not return any results. Is that the correct format and if so what would be causing it to return nothing at all?