which php\mysql query is more proper -
i'm still learning , don't know php\mysql query more proper? both work fine i'm using second one
$query = "select id, username, email members"; $result = $conn->query($query); if ($result) { while ($row = mysqli_fetch_array($result)){ or
$query = mysqli_query($conn,"select id, username members"); if ($query) { while ($row = mysqli_fetch_array($query))
the answer subjective (matter of opinion).
the first code snippet object orientated, second procedural. if you, i'd use whichever code style use in rest of project, neither "better", although argue oo better practice.
Comments
Post a Comment