PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
-- Hint: use Ctrl+Enter for SQL autocomplete create table notes ( id int, title varchar(255), article varchar(255), created datetime ); INSERT INTO notes VALUES (1, 'Link Title', 'Article name', NOW()); SELECT * FROM notes;
Copy Clear
Copy Format Clear
<?php //require_once "mysitedb.php"; $link = &$mysqli; $query = "SELECT * FROM notes"; $select_note = mysqli_query($link, $query); while ($note = mysqli_fetch_array($select_note)) { echo $note["id"] . "<br>"; echo '<a href="comments.php?note=' . $note["id"] . '">' . $note["title"] . "</a>"; echo $note["created"], "<br>"; echo $note["article"], "<br>"; }
Show:  
Copy Clear