need tutorial how to display multiple tables from database. i have table (price) that holds various pricing data related to table (acc_establishments). how do i link tables together to display data (price) that corresponds to (acc_establishments). need a simple example how to do this. thanks
sjeggels 0 Newbie Poster
Recommended Answers
Jump to Postyou need to join two tables together
assuming you had these 2 table
ill make this example simple/* tables */
price
price_id - int(autoincrement)
prod_price - doubleacc_establishments
prod_id - int(autoincrement)
prod_name - varchar
price_id - int/* query */
select ae.prod_name, p.prod_price from acc_establishments as …
Jump to PostYou should post your code here so that contributors can make solutions specific to your needs. However, good advice so far - use joins. Your example probably requires the INNER JOIN.
$recordset = mysql_query(" SELECT t1.field4, t2.field7 FROM table1 AS t1 INNER JOIN table2 AS t2 ON …
Jump to PostYou don't need a join with your setup. Just dropdown like so:
<form ...> <select id="range" name="range"> <option value="1">R0 - R350</option> <option value="2">R350 - R600</option> <option value="3">R600 - R1000</option> <option value="5">R1000 - R2000</option> </select> </form>
When the form is sent - get the value of the select …
All 9 Replies
rajabhaskar525 1 Junior Poster
vaultdweller123 32 Posting Pro

diafol
vaultdweller123 32 Posting Pro
sjeggels 0 Newbie Poster

diafol
vaultdweller123 32 Posting Pro
vaultdweller123 32 Posting Pro
vaultdweller123 32 Posting Pro
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.