Search code examples
phpmysqldrupaldrupal-7drupal-6

drupal database structure ..cannot get it


I am a PHP developer and I don't know much about Drupal. Now I have the task to fetch all restaurants names from a Drupal database. I have not been able to find out, which table Drupal is using to store the names of the restaurants. I am sure it's an easy task for anyone who knows Drupal.

enter image description here

enter image description here

enter image description here

enter image description here


Solution

  • I assume that you've lost site files or just don't want to mess with Drupal, because it is fairly easy to get data from working copy of site.

    This could work to retrieve names, if your restaurant implemented using node:

    • Look for type column in node_type table of a record which most likely is a Restaurant.

    • Than go to node table and filter by type column, which you got on step before this one.

    It is more complex if Restaurant is a custom entity provided by other module or a taxonomy term.