I have no clue as to how to properly write this in raw sql, so I'll try and supply as much 开发者_运维技巧clear information as I can.
Goal in "english"
I would like to select the value column..
in site_tmplvar_contentvalues..
where contentid = 8 and tmplvarid = 1
Goal in "english"
I would like to select the value column..
in from site_tmplvar_contentvalues
where contentid = 8 and tmplvarid = 1
SELECT `value` FROM site_tmplvar_contentvalues WHERE contentid=8 and tmplvarid=1
I'm surprised you couldn't google/search SO for basic SQL syntax...
select `value`
from site_tmplvar_contentvalues
where contentid = 8 and tmplvarid = 1
A join is used to select values from more than one table. You have only one table here so the SQL would be
SELECT `value`
FROM `site_tmplvar_contentvalues`
WHERE contentid = 8 AND tmplvarid = 1
If you really need a join please give us some more information about the tables and the related fields in those tables.
精彩评论