Ad block is installed and active. Please support us by disabling it.
HomeWednesday, April 25, 2018, 08:53:39
1

MySQL – Select from two tables

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

Sitemap

phpForm.net Website Sitemap

Link Base 2.0.

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.

Bookmark Script

Allow your users to easily bookmark your site, by clicking on a link on the page.

PHP Str_replace - PHP Tutorial

This function returns a string or an array with all occurrences of search in subject replaced with the given replace value.

MySQL Basic Functions

MySQL Basic Functions - select, delete, update..

E-Cards 1.1. PHP Script

This script will allow your visitors to send e-cards to their friends. It features admin notification and HTML output.To use the "e-cards" script completely free , the "powered by" link at the bottom of the pages must stay intact.

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.

Upload File with PHP

Basic file uploading with PHP

PHP Cookies - setcookie

Defines a cookie to be sent along with the rest of the HTTP headers.

Show / Hide Div with CSS

CSS Display and Visibility:The visibility property specifies whether or not an element is visible.
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.