@$sql_usuario = "SELECT * FROM usuario ";
@$qry_usuario = @mysql_query($sql_usuario );
@$linha_usuario = mysql_fetch_array($qry_usuario );
Array ([0] => 6 [u_id] => 6 [1] => 54354554 [u_cod] => 54354554 [2] => 54354554 [u_cod] => 54354554) = 17 [u_id] => 17 [1] => 3232323 [u_cod2] => 3232323 [2] => 3232323 [u_cod2] => 3232323
I have this query
. How would I convert to PDO
? The return of the data is different:
@$sql_usuario = $dbconn->prepare("SELECT * FROM usuario");
@$sql_usuario->execute();
@$linha_usuario = $sql_usuario->fetch(PDO::FETCH_ASSOC);
> [u_id] => 6 [u_cod] => 54354554 [u_cod] => 54354554) Array ([u_id] => 17 [u_cod2] => 3232323 [u_cod2] = & 32t32323 )