HomeSunday, June 24, 2018, 01:40:25
1

MySQL – Select from two tables

Monday, February 9, 15, 01:14:59, 3 Yaers Ago Via wain, Hits: 6460
Select data from two tables, PHP MySQL
Code:
<?php
$result = mysql_query("SELECT id, text FROM base_one")
or die(mysql_error());
while($row=mysql_fetch_array($result)){
$resultb = mysql_query("SELECT id, text FROM base_two
WHERE id=".$row['id']." ORDER by text ASC")
or die(mysql_error());
while($link=mysql_fetch_array($resultb)){
echo $link[text];
echo "<br />";
}
}
?>

Sign In

Sponsor
Related

Tell A Friend with Captcha

This form allows your visitors to suggest your site to a friend. It features an HTML email format and an admin notification email.

Captcha V1 - Free PHP Script

An anti-spam form protection image written in PHP, Version: 1.1.

PHPBB3 Shoutbox

Vesion: 1.1. Released: 08/08/10, Licence GNU, Price: Free

Preventing multiple form submissions

Preventing multiple form submissions

PHP Links Script 1.1.

This script allows you to manage your links using a MySQL database. It features easy install, user submission, and an admin panel to add, edit and remove categories and links. The script is easy to customize to suit your needs.

Email to Friend - PHP Script

This form allows your visitors to suggest your site to a friend. It features an HTML email format and an admin notification email.

PHP Mail

Sends an email.

PHP Tutorials

Useful step-by-step PHP tutorials for beginners

Captcha V2 - Free PHP Script

PHP Captcha protection image Version 2, - Requirement(s): PHP Server, GD Library

PHP Form Basic

PHP Form - PHP form basic, Requirement(s): PHP Server
About Author

wain

Date Registered: Sun, Feb 8, 15
Last Time Online: Sun, Mar 18, 18
So far has created 115 entries.
wain
This author has not yet filled in any details.