3
Hinweis: Array in String-Umwandlung in Lehre AbfrageHinweis: Array String converstion in Doctrain Abfrage
foreach($listLocations as $k=>$location){
$list[] = "'".$location['id']."'";
}
$storesList = implode(',', $list);
// Gibt string (23) " '191', '195',‘ 215' , '265'“
$storesList = (string)$storesList;
ich es String geändert, aber in Query bedenkt, dass es immer noch als Array
$sql="SELECT * from tbl_students WHERE s.store_id IN (".$storesList .")";
$conn = $this->getEntityManager()->getConnection();
$stmt = $conn->prepare($sql);
nett und schnell Antworten. gut Beispiel. – Deep
@Deep thanks.Preciate dass –
Danke für die Antwort, aber ich bin immer noch auf das gleiche Problem. – Developer