在phpmyadmin SELECT WHERE 1中显示行0 - 0(总计1次,查询耗时0.0008秒。)

I have inserted a row in a phpmyadmin table but when i run any of following commands it returns:

Showing rows 0 - 0 (1 total, Query took 0.0008 seconds.)

SELECT * FROM library_info WHERE 1

SELECT * FROM library_info

SELECT * FROM library_info WHERE 1

SELECT * FROM library_info

HOW THE DATA IS STORED IN THE TABLE

I need to use the same in my login page of php code for php page is

<?php
require('connect.inc.php');
// User is not logged in.
session_start();
if (isset($_POST['cmdlogin'])) {
    $u     = strip_tags($_POST['username']);
    $p     = strip_tags($_POST['password']);
    $query = "SELECT * FROM user_details WHERE USERNAME = '$u' AND PASSWORD = '$p'";
    echo $query;

    $result = mysql_query($query, $conn);
    if ($result) {
        echo "Valid";
    } else {
        echo "Invalid";
    } 
} else {
    echo "2";
    include 'index.php';
}
?>

Result: SELECT * FROM user_details WHERE USERNAME = 'Admin' and PASSWORD = 'JainLibrary' Invalid

The row-counter is zero-based, so you get the 0-th row that is exactly the one you inserted.

Yeh i come to know the solution to my problems

Actually there was no issue with my phpMyAdmin Sql Query result.

row-counter is the index of the rows that results and it always starts from 0 and the table had only one row that's why it was showing Showing rows 0 - 0 (1 total, Query took 0.0008 seconds.).

Secondly my php code was of some issue

In some commands i used mysql_query or in others it was mysqli_query

i changed

mysql_query($query,$conn);

to

mysql_query($conn,$query);

It worked fine