php - Displaying Data From Two SQL Tables Syntax Explanation -


I'm new to SQL and am trying to better understand the syntax of displaying data from two tables. I am reading through a lot of tutorials (), but I am still a bit faint about this topic.

The behavior I want is to display data from two SQL tables in an HTML table. It would be easy, in addition to Table 2, some more information is being stored in the data in each table.

Table 1 (TrainingItretcher)
Deposit Date, ID, Customer_Name, Product_Name, _Product_Condition
Table 2
Submit, ID, I display row data similar to two tables To use a union successfully, but like club, club_flex, club_loft, and club_hand from the second table when I plug it in, nothing is displayed. Select the trainingaidreturns union from mysqli_query ($ con, "SELECT SubmitDate, ID, customer_name, product_name, product_condition submit, ID, customer_name, product_name, product from the outline of the club" );

And here I need the code inevitably. mysqli_query ($ con, "submit submit, id, customer_name, product_name, select the TrademarkConcenter Union since training, Submit ID, Customer_Name, Product_Name, ProductCand, Productive compliance with club_type, club_hand, club_flax, club-larft from clubrechure ");

I think I need to use one join, but I do not understand the syntax. If someone can tell me in the right direction, then I appreciate it!

If you enter a single query in a query editor, the effect of "Column for Column and DataType Columns You can change something to change:

$ result = mysqli_query ($ con, " SELECT SubmitDate, ID, customer_name, product_name, product_condition from trainingaidreturns union select submit, id, customer_name, product_name, product_codition, club_type, club_hand, club_flax, club_loft clubreturns "); From

to:

  $ result = mysqli_query ($ con, "select submit, id, customer_name, product_name, product_codition, club_type, club_hand, club_flax, Club_Loft Clabberthorn Union Select Submit, ID, Customer_Name, Product_Name, ProductConnect, Blank, Blank, Empty, Training with Earners ");   

Or similarly the "placeholder / empty" values ​​in this column do not match the table in the table

Edit:

There is an immaculate display of a concept here:

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -