so I'll try to be short, I'm trying to ORDER BY ID from table whose values are separated by commas. Here's an Image:
I want them to be ordered like this when displayed: 34, 40, 33, 0.
here's my code:
/// movie
$myuserid = $_SESSION['user_id'];
$mymovies = "SELECT p_movies FROM user_details WHERE user_id='$myuserid' ";
$mymoviesresult = mysqli_query($_db,$mymovies);
$mymovie = mysqli_fetch_array($mymoviesresult);
/// movie
$mypurchases = $mymovie['p_movies'];
$sql = "SELECT * FROM movies WHERE find_in_set(id, '$mypurchases') > 0";
$res_data = mysqli_query($_db,$sql);
if($res_data = mysqli_query($_db, $sql)){
if(mysqli_num_rows($res_data) > 0){
while($row = mysqli_fetch_array($res_data)){ include 'movies/appearance.php'; }}}
I tried to add ORDER BY DESC and ASC, it doesn't work. Is it possible to order results in the manner stated above? Don't know how to explain it better, sorry for my English.