, Simple questions

Source: Internet
Author: User
Online, etc. simple question! The MySQL database has a good table with the following fields: good_id (auto-increment) and good_name. good_id (13, 14 ,.....) It is a number, and good_name is a Chinese character (Tian Nan Xing, Bai Shu ...) There is a dateinfo. php page with parameters, dateinfo. php? Good_id13, I want to put good_name corresponding to the good_id parameter online, etc., a simple problem!
The MySQL database has a good table with the following fields:

Good_id (automatic growth), good_name
Good_id (13, 14 ,.....) It is a number, and good_name is a Chinese character (Tian Nan Xing, Bai Shu ...)

There is a dateinfo. php page with parameters, dateinfo. php? Good_id = 13. I want to extract Chinese characters from the good_name field corresponding to the good_id parameter and display them in Between, is Tian Nanxing


------ Solution --------------------
PHP code
$ Result = mysql_query ("select * from good where good_id =". $ _ GET ['good _ id']); $ arr = mysql_fetch_assoc ($ result); echo"". $ Arr ['good _ name']."";

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.