How does this look in PHP mysql?

Source: Internet
Author: User
Tags php mysql
Premise: There is a field named ABC in the database in a table, but forget the table is called what name, and the database has hundreds of tables, it is impossible to find a one, so then the demand came
How do I quickly find out which table this field is in?


Reply to discussion (solution)

If your database is in MySQL after 5.0 version can be achieved through the INFORMATION_SCHEMA library:

Use INFORMATION_SCHEMA;
SELECT * from columns where column_name= ' lookup field name ';

If your database is in MySQL after 5.0 version can be achieved through the INFORMATION_SCHEMA library:

Use INFORMATION_SCHEMA;
SELECT * from columns where column_name= ' lookup field name ';



What do you mean by this INFORMATION_SCHEMA library, I use the Visual database software Navicat software, how does this software pull up the library you said?


If your database is in MySQL after 5.0 version can be achieved through the INFORMATION_SCHEMA library:

Use INFORMATION_SCHEMA;
SELECT * from columns where column_name= ' lookup field name ';



What do you mean by this INFORMATION_SCHEMA library, I use the Visual database software Navicat software, how does this software pull up the library you said?



If you have permission, Navicat can see this library directly,



If your database is in MySQL after 5.0 version can be achieved through the INFORMATION_SCHEMA library:

Use INFORMATION_SCHEMA;
SELECT * from columns where column_name= ' lookup field name ';



What do you mean by this INFORMATION_SCHEMA library, I use the Visual database software Navicat software, how does this software pull up the library you said?



If you have permission, Navicat can see this library directly,


I'm local, I'm sure there is, but I didn't find it.

In phpMyAdmin, you can view it directly in SQL.

Install MySQL By default there will be 2 databases
Information_schema
Mysql

  • 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.