I have this piece of code which i use in order to get all the values inside a column And save them in an array.
$sektori="SELECT * FROM userss WHERE Username='".$_SESSION['user_name']."'"
or die(mysql_error());
$resektor = odbc_exec($connection, $sektori) or die(odbc_error());
while( $row = odbc_fetch_array($resektor) ) {
$ids_sektor = explode("/",$row['sektori']);
}
I need to add this condition here:
$strSQL = "SELECT formas.*, SMS_SERVISI.IDTICKET, SMS_SERVISI.MBYLLUR,SMS_SERVISI.time_added
FROM formas
LEFT JOIN SMS_SERVISI ON formas.ID = SMS_SERVISI.IDTICKET WHERE formas.data_fillim >= '$yesterday' AND formas.data_fillim <= '$tomorrow' AND sektori_pergjegjes IN ($ids_sektor) ORDER BY formas.id DESC";
It says i have a syntax error, but i don't know..maybe i'm doinf the wrong thing, help please.
Thanks in advance.