Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6377323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:51:23+00:00 2026-05-25T01:51:23+00:00

I think I got the MySQL part of my database correct. After tons of

  • 0

I think I got the MySQL part of my database correct. After tons of studying, I created an InnoDB database with two tables: Venues and Events.

Each venue has a unique ID (VENUE_ID) that I indexed. Then each event has a column by the name of VENUE_LOCATION that has the ID number of the venue the event belongs to.
This is how I have the event table is set up 🙂

enter image description here

I think that’s all good, now I’m having problems getting all of that data displayed using php :/

So far I’ve done simple stuff such as select data from a single table but I’m lost as to how I can retrieve the information from the events table, AND insert all of the corresponding information from VENUES depending on what number is in ‘VENUE_LOCATION’.

And I really have searched up so many examples and tutorials but I have found nothing that exactly shows what I want to do. Any tips as to which direction I should take are greatly appreciated :)!
Thanks again

Edit:
Here’s what I have now

<?php

$dbuser="nightl7_main";
$dbpass="mypw";
$dbname="nightl7_complete";  //the name of the database
$chandle = mysql_connect("localhost", $dbuser, $dbpass) 
    or die("Connection Failure to Database");
mysql_select_db($dbname, $chandle) or die ($dbname . " Database not found. " . $dbuser);


$result = mysql_query("SELECT * FROM example")
or die(mysql_error());  
return $result;


?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:51:24+00:00Added an answer on May 25, 2026 at 1:51 am
    SELECT e.*, v.* FROM Events e
    INNER JOIN Venues v ON e.VENUE_LOCATION = v.VENUE_ID
    

    This will select all the information of events and all the information of the venue where the event has taken place.


    EDIT

    This is the PHP code you could be using for starters:

    <?php
    
    $dbuser = 'nightl7_main';
    $dbpass = 'mypw';
    $dbname = 'nightl7_complete';  //the name of the database
    $chandle = mysql_connect('localhost', $dbuser, $dbpass)
        or die('Connection Failure to Database');
    mysql_select_db($dbname, $chandle) or die ($dbname . ' Database not found. ' . $dbuser);
    
    $query = 'SELECT e.*, v.* FROM Events e '.
             'INNER JOIN Venues v ON e.VENUE_LOCATION = v.VENUE_ID';
    $result = mysql_query($query) or die(mysql_error());
    while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
        echo $row['ID'].' '.$row['VENUE_LOCATION'].' '.$row['IMAGE_URL'].'<br />'; // access any column you like here
    }
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background I've got two tables with different types of feedback items in MySQL. I've
I need to connect to a MySQL database via C# express 2008. I think
Scenario: Think you have got 90TB of text in 200 tables. This is structured
I've got a locally installed MySQL database server that I want to use for
UPDATE2: I think I got it now: <?php /* * @name Lawler's algorithm PHP
I have studied generators feature and i think i got it but i would
I went through some tutorials on the State monad and I think I got
I think I have got something simple wrong here. I am trying to pass
I think I've got a fundamental misunderstanding going on, concerning a SQL Server Reporting
I'm quite new to the field of computer science but I think I've got

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.