php - Why use letters infront of each value in mysqli query? -
so have been wondering while now. why use letters infront of each value in query this? in database, each of these values without letter infront.
$sql = " select c.client_id, c.client_name, c.contactperson, c.internal_comment, if null(r.region, 'alle byer') region, c.phone, c.email, uu.fullname changed_by, (select count(p.project_id) projects p p.client_id = c.client_id , (p.is_deleted != 1 or p.is_deleted null) ) numprojects clients c left join users uu on c.db_changed_by = uu.id left join regions r on c.region_id = r.region_id (c.is_deleted != 1 or c.is_deleted null) ";
i have tried looking up, can't find anywhere.
when in sql need use more 1 table query, can this:
select person.name, vehicle.id person, vehicle;
or can smaller, , put this
select p.name, v.id person p, vehicle v;
its reduce query lenght, , useful you
Comments
Post a Comment