Home ORDER BY is not working for mysql table
Reply: 0

ORDER BY is not working for mysql table

user768 Published in March 20, 2018, 5:17 pm

I have a dummy database saved in phpmyadmin.I am trying to sort the data on the basis of column user_uid. Here is some of my database

The php code that i am using to sort the table is

include_once 'dbh.inc.php';//file contains the variables req to connect to database
$sql = "SELECT * FROM client 
        ORDER BY user_uid;";
$result = mysqli_query($conn,$sql);
    $row = array();
    ($row = mysqli_fetch_array($result));

However this doesn't seem to work.What am I doing wrong with the code?

Additional info: user_uid is a foreign key and the reference to the user_uid is from another table named users

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.37661 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO