Ad block is installed and active. Please support us by disabling it.
HomeThursday, September 21, 2017, 03:22:23
1

MySQL – Select from two tables

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

Stack Overflow Clone Script - Ja2BU

Open source question and answer script written in PHP, MySQL and jQuery. Main features are: SEO friendly url's, private message system, rating system, comments system.

PHP Mail

Sends an email.

PHP Date Examples

Returns a string formatted according to the given format string using the given integer timestamp or the current time if no timestamp is given.

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.

Upload Image With PHP

[Example3] Tutorial - How to upload image in php.

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.

PHP Form Validation

PHP form validation :: PHP tutorial, requirement(s): PHP Server

Adodb Recordcount Example

RecordCount returns the number of rows in the record set.

Email Link

HTML email link example

PHP Fwrite : fwrite

php write to file - how to write data to a file using the php frwite function
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.