Jump to content

changing order


aznjay

Recommended Posts

[code]
$result6e = mysql_query("SELECT * FROM pages ORDER BY organize") or die(mysql_error());
while($row6e = mysql_fetch_array( $result6e ))
{
echo "<table border='1'>";
echo "<td></td><td><input type='text' name='order' value='" . $row6e['organize'] . "' size='2'></td>";
echo "<td>" . $row6e['title'] . "</td><td>" . $row6e['content'] . "</td><td><a href='?news=edit&event=" . $row6e['id'] . "'>Edit</a></td><td><a href='?news=delete&event=" . $row6e['id'] . "'>Delete</a></td>";
echo "</table>";
}


if($_GET['news'] == 'order')
{
$_tit = $_POST['order'];
$result6e = mysql_query("SELECT * FROM pages ORDER BY organize") or die(mysql_error());
while($row6e = mysql_fetch_array( $result6e ))
{
$fut = $row6e['organize'];
mysql_query("UPDATE pages SET organize='" . $_tit . "' WHERE organize='" . $_tit . "'");
}
}
[/code]

can anyone change the code or whatever...I'm trying to make a order alternator...which let's me change the order of the items.
Link to comment
https://forums.phpfreaks.com/topic/28635-changing-order/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.