PHP reads table problems in the database

Source: Internet
Author: User
The results of the operation, as if only the first 24 rows have problems. If reading the database table is normal, the contents of the database should be displayed in each column.
 
  Project Details


Reply to discussion (solution)

$query = "SELECT * from $jiaoshi _table where id= '". $id. "'";
Modified to:
$query = "SELECT * from $jiaoshi _table where id= ' $id '";

$query = "SELECT * from $jiaoshi _table where id= '". $id. "'";
Modified to:
$query = "SELECT * from $jiaoshi _table where id= ' $id '"; I just tried it your way, or I can't.

Where does your $id assign value?
It's not in config.php or header.php, is there?

The same upstairs God, and I remember the wrong, $jiaoshi _table without quotes?

Where does your $id assign value?
It's not in config.php or header.php, is there?

 
  ";}  else{  echo "";  } if ($row [' Surplus ']==0)     $ss = "not selectable"; else $ss = "optional";      echo "  ". $row [' id ']. "".  $row [' Subject ']. "     ". $row [' Teacher ']. "     ". $row [' Zhicheng ']. "     ". $row [' number ']. " ". $row [' Xuehao ']." ". $ss." View   ";   $n + +;   } ?>
That's the bottom line, right?

LZ you want to pass in the ID through the URL?

That should be done with the $_get method.

LZ you want to pass in the ID through the URL?

That should be done with the $_get method. Thank you can you tell me the exact statement? Because I'm still a rookie.

You mean view

Then get the ID of the way to use $_get[' ID '] access, and you are directly $id, how can it?
A minimum of $id = $_get[' id ') is required; can only

What should you do when you click in the URL?
Xiangxiziliao.php?id=1

And then

if (Isset ($_get[' id ') &&$_get[' id ']!= ') {
echo $_get[' id '];
}

Under test

For a more detailed reference w3school.

You mean view

Then get the ID of the way to use $_get[' ID '] access, and you are directly $id, how can it?
A minimum of $id = $_get[' id ') is required; How can that be changed in detail?

!--? php $id = $_get[' id '];        $query = "SELECT * from $jiaoshi _table where id= '". $id. "'";        mysql_query ("Set names ' GB2312 '"); $result =mysql_query ($query); ...         

!--? php $id = $_get[' id '];        $query = "SELECT * from $jiaoshi _table where id= '". $id. "'";        mysql_query ("Set names ' GB2312 '"); $result =mysql_query ($query); ...  Normal display, as always thanks! 
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.