<?php $db = new PDO("sqlite::memory:"); $db->exec('CREATE TABLE test_table (test_column TEXT)'); $stmt = $db->prepare('INSERT INTO test_table (test_column) VALUES (?)'); $stmt->execute(array("val1")); $stmt->execute(array("val2")); $stmt->execute(array("val3")); $result = $db->query("SELECT * FROM test_table ORDER BY test_column ASC", PDO::FETCH_ASSOC); foreach($result as $r) { var_dump($r); }
You have javascript disabled. You will not be able to edit any code.