Topic awaiting preservation: mysql: insert into |
|
---|---|
Author | Thread |
Paranoid (IV) Inmate From: 1393 |
posted 01-20-2006 02:53
Ok, I'm not sure how to ask this so it will make sense... but here we go. How does php/mysql decide where a data entry is going to go within the table? code: connectDB(); $query = "SELECT * FROM newsTable"; $result = mysql_query($query); $num = mysql_numrows($result); for ($i = ($num - 1); $i >= 0; $i--) { $id = mysql_result($result, $i, "id"); $title = mysql_result($result, $i, "title"); $title = unFormatDataForm($title); echo '<li><a href="index.php?cat=news&func=updateForm&id=' . $id . '">' . $title . '</a></li>'; }
code: $query = "INSERT INTO newsTable VALUES ('', '$title', '$content')"; mysql_query($query);
|
Lunatic (VI) Inmate From: under the bed |
posted 01-20-2006 03:29
"where" it goes depends on how your table is set up. |
Paranoid (IV) Inmate From: 1393 |
posted 01-20-2006 04:28
ORDER BY !! I see the light! Thank you DL! |
Lunatic (VI) Inmate From: under the bed |
posted 01-20-2006 05:11 |