April 29, 201016 yr SELECT jos_comprofiler.user_id, jos_users.email FROM jos_comprofiler WHERE jos_comprofiler.cb_music LIKE '%house%' INNER JOIN jos_users ON jos_comprofiler.user_id=jos_users.id ORDER BY jos_users.email DESC ok this is my query as it stands. the query works fine in my database without the Like part however when i put the LIKE part in i get the error #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE jos_comprofiler.cb_music LIKE '%house%' INNER JOIN jos_users ON jos_comp' at line 2 Stuck on this one for a while now. At the moment without that query im essentially pulling a list of all user IDs with a specific genre then cross referencing to another table to pull out the emails but without loading an array in php to create a list of user ids it becomes long winded. Any suggestions
April 29, 201016 yr SELECT jos_comprofiler.user_id, jos_users.email FROM jos_comprofiler INNER JOIN jos_users ON jos_comprofiler.user_id=jos_users.id WHERE jos_comprofiler.cb_music LIKE '%house%' ORDER BY jos_users.email DESC Try that
April 29, 201016 yr Author SELECT jos_comprofiler.user_id, jos_users.email FROM jos_comprofiler INNER JOIN jos_users ON jos_comprofiler.user_id=jos_users.id WHERE jos_comprofiler.cb_music LIKE '%house%' ORDER BY jos_users.email DESC Try that Your a legend. Thank you that worked perfectly
Create an account or sign in to comment