Ad block is installed and active. Please support us by disabling it.
HomeSaturday, January 20, 2018, 16:42:48
1

MySQL – Select from two tables

Monday, February 9, 15, 01:14:59, 3 Yaers Ago Via wain, Hits: 3562
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

PHP $_SESSION

Session_start creates a session or resumes the current one based on a session identifier passed via a GET or POST request, or passed via a cookie.

PHP getdate

Returns an associative array containing the date information of the timestamp, or the current local time if no timestamp is given.

PHP Jquery Form

PHP Jquery Form allow your visitors to contact you directly from your website.

HTML Button Generator

This script will allow your visitors to create HTML Buttons online. To use the "html button generator" script completely free , the "powered by" link at the bottom of the pages must stay intact.

PHP Cookies and Sessions Tutorial

PHP Cookies and Sessions Tutorials

Jquery - Formatting International Phone Numbers

How to format international telephone numbers with jquery

PHP Mail

Sends an email.

php Array

These functions allow you to interact with and manipulate arrays in various ways. Arrays are essential for storing, managing, and operating on sets of variables.

PHP DateTimeZone

PHP representation of time zone

PHP Forms

FREE PHP forms
About Author

wain

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