Is the following way to write a query safe from XSS/injection? or does it treat the variable as simple string replacement? I'm not going to clean the strings before inputting them, so is this safe?
Db::select('SELECT l.slug FROM audio as t, music as l, song as c
where t.song_id = l.id
and c.id = l.band_id
and t.slug = ?
and c.id = ? ', [$value1, $value2]);
or should I just rewrite the whole thing as models using
model::where()
where ->()
join ->()
thanks
Last updated