Thread: Joining Tables
View Single Post
  #15  
Old 04-10-2012, 01:14 AM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 110,800
SilverDragonTears is on a distinguished road
Default

No it's working now :) The only issue I'm having now is I don't think that the sort id's are updating into the db

Code:
<?php

include("functions/functions.php");
include("functions/functions_users.php");
include("functions/functions_adopts.php");
include("classes/class_pagination.php");
include("css/pagination.css");
include("inc/lang.php");


//***************//
//  START SCRIPT //
//***************//

if ($_POST)
{
	
	$userID = $_COOKIE['auid'];

	foreach($_POST['orderaid'] as $orderID => $aid)
	{
		
		$adopts->query('REPLACE INTO ' . $prefix . 'sort_adoptables (`user_id`, `adoptable_id`, `sorting_id`) 
									VALUES ("' . addslashes($userID) . '", "' . addslashes($aid) . '", "' . addslashes($orderID) . '")');

		
	}
	
	echo '<p>Adoptables have been rearranged</p>';
	
}
?>
__________________

Check out SilvaTales
Reply With Quote