Focus mode

PHP Temel

Koşullama Limit Sıralama

PDO WHERE - LIMIT - ORDER

WHERE

  • = Eşit Değilse
  • != Eşit Değilse
  • > Büyük
  • < Küçük
  • >= Büyük Eşit
  • <= Küçük Eşit
  • && Ve
  • || Veya
$sql = "SELECT * FROM test WHERE id < 5";

$query = $db->query($sql);
if ($query->rowCount()) {
    print_r($query->fetch(PDO::FETCH_ASSOC));
}

ORDER BY

$sql = "SELECT * FROM test ORDER BY isim ASC";

$query = $db->query($sql);
if ($query->rowCount()) {
    print_r($query->fetch(PDO::FETCH_ASSOC));
}

LIMIT

$sql = "FROM test LIMIT 3,2";

$query = $db->query($sql);
if ($query->rowCount()) {
    print_r($query->fetch(PDO::FETCH_ASSOC));
}
left-disk

Programs to Accelerate Your Progress in a Software Career

Join our 4-8 month intensive Patika+ bootcamps, start with the fundamentals and gain comprehensive knowledge to kickstart your software career!

right-cube

Comments

You need to enroll in the course to be able to comment!