Jump to content

Array Random Help... taking from database


edrianhadinata

Recommended Posts

 

require('../conn/db_connection.php');

//seleksi restoran

$pilih_resto="select * from restoran";
$query_pilih_resto=mysql_query($pilih_resto);

echo "<h3>Truly Data : </h3>";
while($resto=mysql_fetch_array($query_pilih_resto)){
	echo"<font color='red'>".$resto["id_restoran"].".". $resto["nama_restoran"]."</font><br>";

	$seleksi_menu_1="select * from jenis_menu";
	$query_menu_1=mysql_query($seleksi_menu_1);
	while($menu_1=mysql_fetch_array($query_menu_1)){
		echo "<font color='green'>".$menu_1["id_jenis_menu"]."</font><br>";

		$seleksi_data_eat="select * from eat where id_restoran like '".$resto["id_restoran"]."' and id_jenis_menu like '".$menu_1["id_jenis_menu"]."'";
		$query_eat=mysql_query($seleksi_data_eat);

				while($eat=mysql_fetch_array($query_eat)){
					echo $eat["nama_eat"]."<br>";

				}

	}
	echo"<br>";
}

echo "------------------------------<br>";

echo "<h3>Random Data : </h3>";

$pilih_resto_2="select * from restoran";
$query_pilih_resto_2=mysql_query($pilih_resto_2);
$menu_PNP="PNP";
$menu_PBK="PBK";
$menu_UTM_1="UTM";
while($data_resto=mysql_fetch_array($query_pilih_resto_2)){

echo "<b>".$data_resto["id_restoran"]."-".$data_resto["nama_restoran"]."</b><br>";
$seleksi_data_eat_PNP="select * from eat where id_restoran like '".$data_resto["id_restoran"]."' and id_jenis_menu like '".$menu_PNP."'";

$seleksi_data_eat_PBK="select * from eat where id_restoran like '".$data_resto["id_restoran"]."' and id_jenis_menu like '".$menu_PBK."'";

$seleksi_data_eat_UTM="select * from eat where id_restoran like '".$data_resto["id_restoran"]."' and id_jenis_menu like '".$menu_UTM_1."'";

$query_eat_UTM=mysql_query($seleksi_data_eat_UTM);
$jml_data_UTM=mysql_num_rows($query_eat_UTM);
	echo "Summary of main Menu : $jml_data_UTM<br>";
	$query_eat_PNP=mysql_query($seleksi_data_eat_PNP);
	$query_eat_PBK=mysql_query($seleksi_data_eat_PBK);

		while($eat_PNP=mysql_fetch_array($query_eat_PNP)){
					$data_eat_PNP[]=$eat_PNP["nama_eat"];
				}
				while(list($index_PNP,$data_PNP)=each($data_eat_PNP)){
					$data_eat_PNP_list[$index_PNP]=$data_PNP;
				}

		while($eat_PBK=mysql_fetch_array($query_eat_PBK)){
				$data_eat_PBK[]=$eat_PBK["nama_eat"];
				}
		while(list($index_PBK,$data_PBK)=each($data_eat_PBK)){
				$data_eat_PBK_list[$index_PBK]=$data_PBK;
				}
		while($eat_UTM=mysql_fetch_array($query_eat_UTM)){
				$eat_UTMx[]=$eat_UTM["nama_eat"];
				}	
		for($i=0;$i<$jml_data_UTM;$i++){

				$random_data_PNP[$i]=array_rand($data_eat_PNP_list,1);
				$random_data_PBK[$i]=array_rand($data_eat_PBK_list,1);
				echo "<font color='red'>".$data_eat_PNP_list[$random_data_PNP[$i]]."</font>---<font color='green'>". $eat_UTMx[$i]."</font>---<font color='blue'>".$data_eat_PBK_list[$random_data_PBK[$i]]."</font><br>";

				}	
}

 

Please Help, There is a random error data

 

 

how to create random data like this?

 

Data =>

Restoran A:

 

Menu appetizers :

- Sup

- Sate Usus

- Trancam

 

Main Menu

- Nasi Goreng

- Nasi Goreng Putih

- Nasi + Ayam Penyet

- Nasi + Bebek Panggang

- Ikan Gurame Asam + Nasi

- Nasi Soto

 

Menu Dessert

- Pudding

- Buah Segar

- Juice Aplukat

 

 

Restoran B :

 

Menu appetizers

-Sup Ikan Paprika

-Sup Jamur Spesial

-Sup Urat Sapi Saus Tiram

-Sup May Jala - Jala

 

Main Menu

- Bubur Ayam Kombinasi

- Bubur Ayam/Sapi Clay Pot

- Bubur Telor Pitan Clay Pot

- Gurame Panggang

- Pangsit Udang

- Cumi-cumi Goreng Special

- Kepiting Lembek Mentega

- Sayap Ayam Panggang

 

Dessert

-Juice Alpukat

-Mix Juice

-Sui Kiau Goreng Salad

-Ha Kaou Sayuran

 

 

Out Put :

 

Restoran A :

 

Menu e ---+--- Main Menu --+---- Dessert

----------------------------------------------------

 

Sup ------- Nasi Goreng ------- Pudding

Sup ------- Nasi Goreng Putih ------- Juice Aplukat

Sate Usus ------- Nasi + Ayam Penyet ------- Pudding

Sup ------- Nasi + Bebek Panggang ------- Buah Segar

Trancam ------- Ikan Gurame Asam + Nasi ------- Buah Segar

Sate Usus ------- Nasi Soto ------- Pudding

 

Restoran B :

 

Menu Pembuka ---+-- Menu Utama --+--- Menu Penutup

-----------------------------------------------------------------------

 

Sup Ikan Paprika ------- Bubur Ayam Kombinasi ------- Juice Alpukat

Sup Urat Sapi Saus Tiram ------- Bubur Ayam/Sapi Clay Pot ------- Sui Kiau Goreng Salad

Sup May Jala-Jala ------- Bubur Telor Pitan Clay Pot ------- Juice Alpukat

Kepiting Lembek Mentega ------- Gurame Panggang ------- Juice Alpukat

Sup Urat Sapi Saus Tiram ------- Pangsit Udang ------- Mix Juice

Sup May Jala-Jala ------- Cumi-cumi Goreng Special ------- Ha Kaou Sayuran

Sup Jamur Spesial ------- Kepiting Lembek Mentega ------- Sui Kiau Goreng Salad

Sup May Jala-Jala ------- Sayap Ayam Panggang ------- Ha Kaou Sayuran

 

Note :

appetizers and desserts at random based on count of data main menu

Link to comment
Share on other sites


<?php require('../conn/db_connection.php');

//seleksi restoran

$pilih_resto="select * from restoran";
$query_pilih_resto=mysql_query($pilih_resto);

    echo "<h3>Data sebenarnya : </h3>";
while($resto=mysql_fetch_array($query_pilih_resto)){
        echo"<font color='red'>".$resto["id_restoran"].".". $resto["nama_restoran"]."</font><br>";
        
        $seleksi_menu_1="select * from jenis_menu";
        $query_menu_1=mysql_query($seleksi_menu_1);
        while($menu_1=mysql_fetch_array($query_menu_1)){
            echo "<font color='green'>".$menu_1["id_jenis_menu"]."</font><br>";
            
            $seleksi_data_makanan="select * from makanan where id_restoran like '".$resto["id_restoran"]."' and id_jenis_menu like '".$menu_1["id_jenis_menu"]."'";
            $query_makanan=mysql_query($seleksi_data_makanan);
            
                    while($makanan=mysql_fetch_array($query_makanan)){
                        echo $makanan["nama_makanan"]."<br>";
                
                    }
            
        }
        echo"<br>";
}

//---------------------------------------------------------------------------
$pilih_resto_2="select * from restoran";
$query_pilih_resto_2=mysql_query($pilih_resto_2);
$menu_PNP="PNP";
$menu_PBK="PBK";
$menu_UTM_1="UTM";

$seleksi_data="select * from restoran";
$data_resto_xx=mysql_query($seleksi_data);
$dataJmlresto=mysql_num_rows($data_resto_xx);

$seleksi_data="select * from makanan";
$query_pilih_makanan=mysql_query($seleksi_data);
$jml_data_makanan=mysql_num_rows($query_pilih_makanan);
$data_i=0;
while($data_resto=mysql_fetch_array($query_pilih_resto_2)){
    
    $data_i++;
    $data_a++;
    $data_u++;
    echo "<b>".$data_resto["id_restoran"]."-".$data_resto["nama_restoran"]."</b><br>";
    
    $seleksi_data_makanan_PNP="select * from makanan where id_restoran like '".$data_resto["id_restoran"]."' and id_jenis_menu like '".$menu_PNP."'";
    
    $seleksi_data_makanan_PBK="select * from makanan where id_restoran like '".$data_resto["id_restoran"]."' and id_jenis_menu like '".$menu_PBK."'";
    
    $seleksi_data_makanan_UTM="select * from makanan where id_restoran like '".$data_resto["id_restoran"]."' and id_jenis_menu like '".$menu_UTM_1."'";
    
    $query_makanan_UTM=mysql_query($seleksi_data_makanan_UTM);
    $jml_data_UTM=mysql_num_rows($query_makanan_UTM);
        echo "Jumlah data menu utama adalah : $jml_data_UTM<br>";
        $query_makanan_PNP=mysql_query($seleksi_data_makanan_PNP);
        $jml_data_PNP=mysql_num_rows($query_makanan_PNP);
        $query_makanan_PBK=mysql_query($seleksi_data_makanan_PBK);
        $jml_data_PBK=mysql_num_rows($query_makanan_PBK);
        if($data_i==$dataJmlresto){
            
            break;
        
        }
        
        $temp_banyak_data_UTM[$data_i-1]+=$jml_data_UTM;
        $temp_banyak_data_PNP[$data_a-1]+=$jml_data_PNP;
        $temp_banyak_data_PBK[$data_u-1]+=$jml_data_PBK;
        
       
        
            $temp_data_UTM_batas_maximum+=$temp_banyak_data_UTM[$data_i-1];
            $temp_data_UTM_batas_minimum+=$temp_banyak_data_UTM[$data_i-2];
            
            $temp_data_PNP_batas_maximum+=$temp_banyak_data_PNP[$data_a-1];
            $temp_data_PNP_batas_minimum+=$temp_banyak_data_PNP[$data_a-2];
            
            $temp_data_PBK_batas_maximum+=$temp_banyak_data_PBK[$data_u-1];
            $temp_data_PBK_batas_minimum+=$temp_banyak_data_PBK[$data_u-2];
            
             
        while($makanan_PNP=mysql_fetch_array($query_makanan_PNP)){
                    $a++;
                    $data_makanan_PNP[$a-1]=$makanan_PNP["nama_makanan"];
                    if($a==$jml_data_UTM){
                        break;    
                    }
                    
            }
                                            
            while($makanan_PBK=mysql_fetch_array($query_makanan_PBK)){
                    $s++;
                    $data_makanan_PBK[$s-1]=$makanan_PBK["nama_makanan"];
                    if($s==$jml_data_UTM){
                        break;    
                    }
            }
            
            while($makanan_UTM=mysql_fetch_array($query_makanan_UTM)){
                    $d++;
                    $data_makanan_UTM[$d-1]=$makanan_UTM["nama_makanan"];
                    if($d==$jml_data_UTM){
                        break;    
                    }
                }
            
            
                echo "Batas Minimum ->$temp_data_PNP_batas_minimum | $temp_data_UTM_batas_minimum  | $temp_data_PBK_batas_minimum<br>";
                echo "Batas Maximum ->$temp_data_PNP_batas_maximum  | $temp_data_UTM_batas_maximum  |  $temp_data_PBK_batas_maximum<br>";    
            for($i=0;$i<$jml_data_UTM;$i++){
                        echo "<font color='red'>".$data_makanan_PNP[rand($temp_data_PNP_batas_minimum,$temp_data_PNP_batas_maximum)]."</font>--<font color='green'>".$data_makanan_UTM[rand($temp_data_UTM_batas_minimum,$temp_data_UTM_batas_maximum)]."--</font><font color='blue'>".$data_makanan_PBK[rand($temp_data_PBK_batas_minimum,$temp_data_PBK_batas_maximum)]."</font><br>";
                
                                 
                }    
    
} ?>

 

I've updated the program, but still a lot of mistakes, there are data that does not appear .. please help me .

its my database :

-- phpMyAdmin SQL Dump
-- version 3.1.3.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 22, 2011 at 05:30 AM
-- Server version: 5.1.33
-- PHP Version: 5.2.9

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Database: `eli`
--

-- --------------------------------------------------------

--
-- Table structure for table `makanan`
--

CREATE TABLE IF NOT EXISTS `makanan` (
  `id_makanan` int(11) NOT NULL AUTO_INCREMENT,
  `harga` int(11) NOT NULL,
  `nama_makanan` varchar(50) NOT NULL,
  `id_jenis_menu` varchar(15) NOT NULL,
  `id_restoran` int( NOT NULL,
  PRIMARY KEY (`id_makanan`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=197 ;

--
-- Dumping data for table `makanan`
--

INSERT INTO `makanan` (`id_makanan`, `harga`, `nama_makanan`, `id_jenis_menu`, `id_restoran`) VALUES
(1, 167500, 'Miso Siru', 'PBK', 1),
(2, 18760, 'Miso Soup', 'PBK', 1),
(3, 21440, 'Suimono', 'PBK', 1),
(4, 30150, 'Agedashi Tofu', 'PBK', 1),
(103, 18000, 'Sio May Kepiting', 'PBK', 2),
(5, 35000, 'Sop Gurame ', 'PBK', 2),
(6, 49500, 'Sop Gurame ', 'PBK', 3),
(7, 6000, 'Bubur Kacang Hijau', 'UTM', 4),
(8, 6000, 'Bubur Ketan Hitam', 'UTM', 4),
(9, 3500, 'Telur Setengah Matang', 'PBK', 4),
(10, 11000, 'Cap Cay', 'PBK', 5),
(11, 5000, 'Kentang Goreng', 'PBK', 5),
(12, 15000, 'Bakso Iga', 'PBK', 5),
(13, 18000, 'Sop Iga', 'PBK', 5),
(14, 32000, 'Bakso Ikan Nelayan', 'PBK', 6),
(15, 34000, 'Bakso Ikan Paprika', 'PBK', 6),
(16, 40000, 'Bakso Jamur Spesial', 'PBK', 6),
(17, 45000, 'Bakso Urat Sapi Saus Tiram', 'PBK', 6),
(18, 35000, 'Sio May Jala - Jala', 'PBK', 6),
(19, 36000, 'Sio May Ketan Kari Ayam', 'PBK', 6),
(20, 8000, 'Pisang Owel', 'PNP', 5),
(194, 95000, 'gado-gado 2', 'UTM', 2),
(195, 9500, 'gado-gado', 'PBK', 9),
(23, 30150, 'Meccha Ice-Cream', 'PNP', 1),
(24, 30150, 'Ogura', 'PNP', 1),
(25, 30150, 'Tempura Banana and Ice-Cream', 'PNP', 1),
(26, 30150, 'Dorayaki', 'PNP', 1),
(27, 30150, 'Daifuku', 'PNP', 1),
(28, 33500, 'Harumaki', 'PNP', 7),
(29, 10000, 'Es Sarang Burung ', 'PNP', 2),
(30, 7500, 'Es Cincau Hijau ', 'PNP', 2),
(31, 8500, 'Es Jeruk', 'PNP', 2),
(32, 9000, 'Es Jeruk Kelapa', 'PNP', 2),
(33, 8500, 'Es Jeruk Lemon', 'PNP', 2),
(34, 45000, 'Bubur Ayam Kombinasi ', 'UTM', 6),
(35, 45000, 'Bubur Ayam/Sapi Clay Pot', 'UTM', 6),
(36, 46000, 'Bubur Telor Pitan Clay Pot', 'UTM', 6),
(38, 30150, 'Agedashi Tofu', 'UTM', 7),
(39, 31490, 'Nasu Dengaku', 'UTM', 7),
(40, 8000, 'Lontong', 'UTM', 4),
(41, 174200, 'Sashimi & California Roll', 'UTM', 1),
(108, 5500, 'Ice Cream ', 'PNP', 3),
(43, 187600, 'Tempura', 'UTM', 1),
(44, 194300, 'Ika-yaki', 'UTM', 1),
(45, 195000, 'Teriyaki Chicken', 'PNP', 1),
(46, 58960, 'Sushi', 'UTM', 1),
(47, 65660, 'Shashimi', 'UTM', 1),
(48, 43550, 'California Roll', 'UTM', 1),
(49, 17000, 'Mercon Daging Sapi', 'UTM', 2),
(50, 15000, 'Ikan Mas Goreng ', 'UTM', 2),
(51, 18000, 'Ikan Mas Goreng Cobek ', 'UTM', 2),
(52, 16000, 'Ikan Mas Bakar ', 'UTM', 2),
(53, 25000, 'Bawal Goreng ', 'UTM', 2),
(54, 20000, 'Ikan Nila Goreng ', 'UTM', 2),
(55, 30000, 'Ikan Nila Bakar ', 'UTM', 2),
(56, 35000, 'Bandeng Duri Lunak ', 'UTM', 2),
(57, 50000, 'Ayam Bakakak', 'UTM', 3),
(58, 15000, 'Ayam Goreng Laos ', 'UTM', 3),
(59, 16000, 'Ayam Goreng Bumbu Desa ', 'UTM', 3),
(60, 15000, 'Ayam Bakar ', 'UTM', 3),
(61, 16500, 'Ayam Bakar Kendil ', 'UTM', 3),
(62, 16000, 'Ayam Cabe Hijau ', 'UTM', 3),
(63, 17000, 'Kwe Tiau Tom Yam', 'UTM', 4),
(64, 7000, 'Mie Goreng Indonesia', 'UTM', 4),
(65, 8000, 'Nasi Orek ', 'UTM', 4),
(66, 7000, 'Kwe tiau polos', 'UTM', 4),
(67, 9000, 'Kwe tiau telur', 'UTM', 4),
(68, 8000, 'Mie Kuah Bandung ', 'UTM', 4),
(69, 8000, 'Nasi Peuyem', 'UTM', 4),
(70, 15000, 'Ayam Kremez', 'UTM', 5),
(71, 16000, 'Cumi Goreng Tepung', 'UTM', 5),
(72, 15000, 'Bebek Kremez', 'UTM', 5),
(73, 13000, 'Ifo Mie Sea Food', 'UTM', 5),
(74, 15000, 'Nasi Goreng', 'UTM', 5),
(75, 18000, 'Special Fried Rice / Nasi Goreng Special', 'UTM', 9),
(76, 12000, 'Barbequed Chicken', 'UTM', 9),
(77, 15000, 'Barbequed Chicken with Coconut Milk', 'UTM', 9),
(78, 8000, 'Chicken Curry', 'UTM', 9),
(79, 8000, 'Fried Chicken', 'UTM', 9),
(80, 15000, 'Stewed Fried Chicken in Tomato Sauce', 'UTM', 9),
(196, 12000, 'Nasi Kepal Ayam Daging', 'UTM', 4),
(82, 17000, 'Kari Kambing', 'UTM', 9),
(83, 13000, 'Rendang', 'UTM', 9),
(84, 11000, 'Ayam Penyet', 'UTM', 10),
(85, 2000, 'tahu tempe bacam', 'PNP', 10),
(86, 10000, 'lele Penyet', 'UTM', 10),
(87, 8500, 'Embal Gepuk', 'UTM', 10),
(88, 14000, 'Bebek Penyet', 'UTM', 10),
(89, 7000, 'Tahu Penyet', 'UTM', 10),
(90, 8000, 'Sayur Asem', 'UTM', 10),
(91, 4000, 'Sate Usus', 'PBK', 10),
(92, 8000, 'Tumis Kangkung', 'UTM', 10),
(93, 6000, 'Trancam', 'PBK', 10),
(94, 3000, 'air mineral', 'PNP', 10),
(95, 3500, 'Tea Manis', 'PBK', 10),
(96, 4000, 'Tea Manis Dingin', 'PBK', 10),
(97, 6000, 'Juice Jeruk', 'PNP', 10),
(98, 7000, 'Juice Terung Belanda', 'PNP', 10),
(99, 6000, 'Kelapa Gelas', 'PNP', 10),
(100, 8000, 'Kelapa Bulat', 'PNP', 10),
(101, 7000, 'Juice Kuini ', 'PNP', 10),
(102, 7000, 'Juice Alpukat', 'PNP', 10),
(104, 15000, 'Sio May Puyuh', 'PBK', 2),
(105, 17000, 'Sio May Udang', 'PBK', 2),
(106, 8000, 'Cap Cay', 'PBK', 2),
(107, 5000, 'Kentang Goreng', 'PBK', 2),
(109, 6000, 'Tahu Talaga Goreng ', 'PNP', 3),
(110, 4000, 'Tahu Bacem ', 'PNP', 3),
(111, 16000, 'Buah Potong Segar ', 'PNP', 3),
(112, 8000, 'Buah Potong Kecil ', 'PNP', 3),
(113, 4000, 'Otak Otak Ikan ', 'PNP', 3),
(114, 8000, 'Es Jeruk', 'PNP', 3),
(115, 9000, 'Es Jeruk Kelapa', 'PNP', 3),
(116, 17000, 'Es Kopyor', 'PNP', 3),
(117, 6500, 'Lemon Ice Cream Tea', 'PNP', 3),
(118, 9000, 'Bihun Polos', 'PBK', 3),
(119, 12000, 'Bihun Telur', 'PBK', 3),
(120, 15000, 'Capcay', 'PBK', 3),
(121, 10000, 'Mie Sop ', 'PBK', 3),
(122, 16000, 'Cumi Goreng ', 'PBK', 3),
(123, 9000, 'Bihun Polos', 'PBK', 3),
(124, 12000, 'Bihun Telur', 'PBK', 3),
(125, 15000, 'Capcay', 'PBK', 3),
(126, 10000, 'Mie Sop ', 'PBK', 3),
(127, 16000, 'Cumi Goreng ', 'PBK', 3),
(128, 8000, 'Juice Mangga', 'PNP', 4),
(129, 8000, 'Juice Melon', 'PNP', 4),
(130, 8000, 'Juice Martabe', 'PNP', 3),
(131, 8500, 'Juice Alpukat', 'PNP', 4),
(132, 6500, 'Es Lemon Tea', 'PBK', 4),
(133, 8000, 'Jus Sirsak', 'PNP', 4),
(134, 8000, 'Orange Float', 'PNP', 4),
(135, 7000, 'Fanta Float', 'PBK', 4),
(136, 7500, 'Moca Mild', 'PBK', 4),
(137, 3000, 'Puding Telur', 'PNP', 5),
(138, 9000, 'Avocado Float', 'PNP', 5),
(139, 9000, 'Blue Sky', 'PNP', 5),
(140, 9000, 'Jus Martabe ', 'PNP', 5),
(141, 8500, 'Jus Jeruk', 'PNP', 5),
(142, 15000, 'Juice Alpukat', 'PNP', 6),
(143, 17000, 'Juice Strawberry', 'PNP', 3),
(144, 21000, 'Mix Juice ', 'PNP', 6),
(145, 70000, 'Gurame Panggang', 'UTM', 6),
(146, 23000, 'Pangsit Udang', 'UTM', 6),
(147, 46000, 'Cumi-cumi Goreng Special', 'UTM', 6),
(148, 45000, 'Kepiting Lembek Mentega', 'UTM', 6),
(149, 46000, 'Sayap Ayam Panggang', 'UTM', 6),
(150, 39000, 'Sayap Ayam Jala-Jala', 'UTM', 6),
(151, 42000, 'Sui Kiau Goreng Salad', 'PNP', 6),
(152, 35000, 'Ha Kaou Sayuran', 'PNP', 6),
(153, 46000, 'Gyumaki', 'UTM', 7),
(154, 52000, 'Kaki Age', 'UTM', 7),
(155, 47570, 'Gyu No Tataki', 'UTM', 7),
(156, 35510, 'Yasai Itami', 'UTM', 7),
(157, 32000, 'Oshinko', 'UTM', 7),
(158, 34000, 'Kaisen Salad', 'PNP', 7),
(159, 88440, 'Tori No Teriyaki', 'UTM', 7),
(160, 84000, 'Tuna Maki', 'UTM', 7),
(161, 67500, 'Yakiudon', 'PBK', 7),
(162, 87000, 'Kaisen Yakiudon', 'PBK', 7),
(163, 92450, 'Nabe-yaki Udon', 'PBK', 7),
(164, 13500, 'Juice Mangga', 'PNP', ,
(165, 18000, 'Juice Strawberry', 'PNP', ,
(166, 21000, 'Blue Sky', 'PNP', ,
(167, 13500, 'Juice Alpukat', 'PNP', ,
(168, 16000, 'Buah Potong Kecil', 'PNP', ,
(169, 16000, 'Jus Sirsak', 'PNP', ,
(170, 25000, 'Cah Kangkung Udang + Nasi', 'UTM', ,
(171, 21000, 'Cincang Krani + Nasi', 'UTM', ,
(172, 25000, 'Pangsit Udang', 'UTM', ,
(173, 21000, 'Ayam Gulai + Nasi', 'UTM', ,
(174, 23000, 'Udang Goreng Tepung ', 'UTM', ,
(175, 15000, 'Ayam pop Garuda', 'UTM', 7),
(176, 13000, 'Dendeng Brekele', 'UTM', ,
(177, 7000, 'Tea Manis Dingin', 'PBK', ,
(178, 8500, 'Lemon Tea Hangat', 'PBK', ,
(179, 4000, 'Tempe Bacem', 'PBK', ,
(180, 13000, 'Juice Mangga', 'PNP', 9),
(181, 17000, 'Juice Strawberry', 'PNP', 9),
(182, 15000, 'Blue Sky', 'PNP', 9),
(183, 13500, 'Juice Alpukat', 'PNP', 9),
(184, 8000, 'Es Lemon Tea', 'PBK', 9),
(185, 13500, 'Jus Sirsak', 'UTM', 9),
(186, 13500, 'Coffee Mix', 'PBK', 9),
(187, 8600, 'Pudding ', 'PNP', 9),
(188, 8000, 'Cappucino Float', 'PBK', 9),
(189, 8500, 'Avocado Float', 'PBK', 9),
(193, 15000, 'Soto Udang + Nasi', 'UTM', 2);

 

Link to comment
Share on other sites

-- phpMyAdmin SQL Dump
-- version 3.1.3.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 22, 2011 at 05:38 AM
-- Server version: 5.1.33
-- PHP Version: 5.2.9

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Database: `eli`
--

-- --------------------------------------------------------

--
-- Table structure for table `jenis_menu`
--

CREATE TABLE IF NOT EXISTS `jenis_menu` (
  `id_jenis_menu` varchar(3) NOT NULL,
  `nama_menu` varchar(50) NOT NULL,
  PRIMARY KEY (`id_jenis_menu`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `jenis_menu`
--

INSERT INTO `jenis_menu` (`id_jenis_menu`, `nama_menu`) VALUES
('PBK', 'Pembuka'),
('PNP', 'Penutup'),
('UTM', 'Utama');

-- --------------------------------------------------------

--
-- Table structure for table `makanan`
--

CREATE TABLE IF NOT EXISTS `makanan` (
  `id_makanan` int(11) NOT NULL AUTO_INCREMENT,
  `harga` int(11) NOT NULL,
  `nama_makanan` varchar(50) NOT NULL,
  `id_jenis_menu` varchar(15) NOT NULL,
  `id_restoran` int( NOT NULL,
  PRIMARY KEY (`id_makanan`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=197 ;

--
-- Dumping data for table `makanan`
--

INSERT INTO `makanan` (`id_makanan`, `harga`, `nama_makanan`, `id_jenis_menu`, `id_restoran`) VALUES
(1, 167500, 'Miso Siru', 'PBK', 1),
(2, 18760, 'Miso Soup', 'PBK', 1),
(3, 21440, 'Suimono', 'PBK', 1),
(4, 30150, 'Agedashi Tofu', 'PBK', 1),
(103, 18000, 'Sio May Kepiting', 'PBK', 2),
(5, 35000, 'Sop Gurame ', 'PBK', 2),
(6, 49500, 'Sop Gurame ', 'PBK', 3),
(7, 6000, 'Bubur Kacang Hijau', 'UTM', 4),
(8, 6000, 'Bubur Ketan Hitam', 'UTM', 4),
(9, 3500, 'Telur Setengah Matang', 'PBK', 4),
(10, 11000, 'Cap Cay', 'PBK', 5),
(11, 5000, 'Kentang Goreng', 'PBK', 5),
(12, 15000, 'Bakso Iga', 'PBK', 5),
(13, 18000, 'Sop Iga', 'PBK', 5),
(14, 32000, 'Bakso Ikan Nelayan', 'PBK', 6),
(15, 34000, 'Bakso Ikan Paprika', 'PBK', 6),
(16, 40000, 'Bakso Jamur Spesial', 'PBK', 6),
(17, 45000, 'Bakso Urat Sapi Saus Tiram', 'PBK', 6),
(18, 35000, 'Sio May Jala - Jala', 'PBK', 6),
(19, 36000, 'Sio May Ketan Kari Ayam', 'PBK', 6),
(20, 8000, 'Pisang Owel', 'PNP', 5),
(194, 95000, 'gado-gado 2', 'UTM', 2),
(195, 9500, 'gado-gado', 'PBK', 9),
(23, 30150, 'Meccha Ice-Cream', 'PNP', 1),
(24, 30150, 'Ogura', 'PNP', 1),
(25, 30150, 'Tempura Banana and Ice-Cream', 'PNP', 1),
(26, 30150, 'Dorayaki', 'PNP', 1),
(27, 30150, 'Daifuku', 'PNP', 1),
(28, 33500, 'Harumaki', 'PNP', 7),
(29, 10000, 'Es Sarang Burung ', 'PNP', 2),
(30, 7500, 'Es Cincau Hijau ', 'PNP', 2),
(31, 8500, 'Es Jeruk', 'PNP', 2),
(32, 9000, 'Es Jeruk Kelapa', 'PNP', 2),
(33, 8500, 'Es Jeruk Lemon', 'PNP', 2),
(34, 45000, 'Bubur Ayam Kombinasi ', 'UTM', 6),
(35, 45000, 'Bubur Ayam/Sapi Clay Pot', 'UTM', 6),
(36, 46000, 'Bubur Telor Pitan Clay Pot', 'UTM', 6),
(38, 30150, 'Agedashi Tofu', 'UTM', 7),
(39, 31490, 'Nasu Dengaku', 'UTM', 7),
(40, 8000, 'Lontong', 'UTM', 4),
(41, 174200, 'Sashimi & California Roll', 'UTM', 1),
(108, 5500, 'Ice Cream ', 'PNP', 3),
(43, 187600, 'Tempura', 'UTM', 1),
(44, 194300, 'Ika-yaki', 'UTM', 1),
(45, 195000, 'Teriyaki Chicken', 'PNP', 1),
(46, 58960, 'Sushi', 'UTM', 1),
(47, 65660, 'Shashimi', 'UTM', 1),
(48, 43550, 'California Roll', 'UTM', 1),
(49, 17000, 'Mercon Daging Sapi', 'UTM', 2),
(50, 15000, 'Ikan Mas Goreng ', 'UTM', 2),
(51, 18000, 'Ikan Mas Goreng Cobek ', 'UTM', 2),
(52, 16000, 'Ikan Mas Bakar ', 'UTM', 2),
(53, 25000, 'Bawal Goreng ', 'UTM', 2),
(54, 20000, 'Ikan Nila Goreng ', 'UTM', 2),
(55, 30000, 'Ikan Nila Bakar ', 'UTM', 2),
(56, 35000, 'Bandeng Duri Lunak ', 'UTM', 2),
(57, 50000, 'Ayam Bakakak', 'UTM', 3),
(58, 15000, 'Ayam Goreng Laos ', 'UTM', 3),
(59, 16000, 'Ayam Goreng Bumbu Desa ', 'UTM', 3),
(60, 15000, 'Ayam Bakar ', 'UTM', 3),
(61, 16500, 'Ayam Bakar Kendil ', 'UTM', 3),
(62, 16000, 'Ayam Cabe Hijau ', 'UTM', 3),
(63, 17000, 'Kwe Tiau Tom Yam', 'UTM', 4),
(64, 7000, 'Mie Goreng Indonesia', 'UTM', 4),
(65, 8000, 'Nasi Orek ', 'UTM', 4),
(66, 7000, 'Kwe tiau polos', 'UTM', 4),
(67, 9000, 'Kwe tiau telur', 'UTM', 4),
(68, 8000, 'Mie Kuah Bandung ', 'UTM', 4),
(69, 8000, 'Nasi Peuyem', 'UTM', 4),
(70, 15000, 'Ayam Kremez', 'UTM', 5),
(71, 16000, 'Cumi Goreng Tepung', 'UTM', 5),
(72, 15000, 'Bebek Kremez', 'UTM', 5),
(73, 13000, 'Ifo Mie Sea Food', 'UTM', 5),
(74, 15000, 'Nasi Goreng', 'UTM', 5),
(75, 18000, 'Special Fried Rice / Nasi Goreng Special', 'UTM', 9),
(76, 12000, 'Barbequed Chicken', 'UTM', 9),
(77, 15000, 'Barbequed Chicken with Coconut Milk', 'UTM', 9),
(78, 8000, 'Chicken Curry', 'UTM', 9),
(79, 8000, 'Fried Chicken', 'UTM', 9),
(80, 15000, 'Stewed Fried Chicken in Tomato Sauce', 'UTM', 9),
(196, 12000, 'Nasi Kepal Ayam Daging', 'UTM', 4),
(82, 17000, 'Kari Kambing', 'UTM', 9),
(83, 13000, 'Rendang', 'UTM', 9),
(84, 11000, 'Ayam Penyet', 'UTM', 10),
(85, 2000, 'tahu tempe bacam', 'PNP', 10),
(86, 10000, 'lele Penyet', 'UTM', 10),
(87, 8500, 'Embal Gepuk', 'UTM', 10),
(88, 14000, 'Bebek Penyet', 'UTM', 10),
(89, 7000, 'Tahu Penyet', 'UTM', 10),
(90, 8000, 'Sayur Asem', 'UTM', 10),
(91, 4000, 'Sate Usus', 'PBK', 10),
(92, 8000, 'Tumis Kangkung', 'UTM', 10),
(93, 6000, 'Trancam', 'PBK', 10),
(94, 3000, 'air mineral', 'PNP', 10),
(95, 3500, 'Tea Manis', 'PBK', 10),
(96, 4000, 'Tea Manis Dingin', 'PBK', 10),
(97, 6000, 'Juice Jeruk', 'PNP', 10),
(98, 7000, 'Juice Terung Belanda', 'PNP', 10),
(99, 6000, 'Kelapa Gelas', 'PNP', 10),
(100, 8000, 'Kelapa Bulat', 'PNP', 10),
(101, 7000, 'Juice Kuini ', 'PNP', 10),
(102, 7000, 'Juice Alpukat', 'PNP', 10),
(104, 15000, 'Sio May Puyuh', 'PBK', 2),
(105, 17000, 'Sio May Udang', 'PBK', 2),
(106, 8000, 'Cap Cay', 'PBK', 2),
(107, 5000, 'Kentang Goreng', 'PBK', 2),
(109, 6000, 'Tahu Talaga Goreng ', 'PNP', 3),
(110, 4000, 'Tahu Bacem ', 'PNP', 3),
(111, 16000, 'Buah Potong Segar ', 'PNP', 3),
(112, 8000, 'Buah Potong Kecil ', 'PNP', 3),
(113, 4000, 'Otak Otak Ikan ', 'PNP', 3),
(114, 8000, 'Es Jeruk', 'PNP', 3),
(115, 9000, 'Es Jeruk Kelapa', 'PNP', 3),
(116, 17000, 'Es Kopyor', 'PNP', 3),
(117, 6500, 'Lemon Ice Cream Tea', 'PNP', 3),
(118, 9000, 'Bihun Polos', 'PBK', 3),
(119, 12000, 'Bihun Telur', 'PBK', 3),
(120, 15000, 'Capcay', 'PBK', 3),
(121, 10000, 'Mie Sop ', 'PBK', 3),
(122, 16000, 'Cumi Goreng ', 'PBK', 3),
(123, 9000, 'Bihun Polos', 'PBK', 3),
(124, 12000, 'Bihun Telur', 'PBK', 3),
(125, 15000, 'Capcay', 'PBK', 3),
(126, 10000, 'Mie Sop ', 'PBK', 3),
(127, 16000, 'Cumi Goreng ', 'PBK', 3),
(128, 8000, 'Juice Mangga', 'PNP', 4),
(129, 8000, 'Juice Melon', 'PNP', 4),
(130, 8000, 'Juice Martabe', 'PNP', 3),
(131, 8500, 'Juice Alpukat', 'PNP', 4),
(132, 6500, 'Es Lemon Tea', 'PBK', 4),
(133, 8000, 'Jus Sirsak', 'PNP', 4),
(134, 8000, 'Orange Float', 'PNP', 4),
(135, 7000, 'Fanta Float', 'PBK', 4),
(136, 7500, 'Moca Mild', 'PBK', 4),
(137, 3000, 'Puding Telur', 'PNP', 5),
(138, 9000, 'Avocado Float', 'PNP', 5),
(139, 9000, 'Blue Sky', 'PNP', 5),
(140, 9000, 'Jus Martabe ', 'PNP', 5),
(141, 8500, 'Jus Jeruk', 'PNP', 5),
(142, 15000, 'Juice Alpukat', 'PNP', 6),
(143, 17000, 'Juice Strawberry', 'PNP', 3),
(144, 21000, 'Mix Juice ', 'PNP', 6),
(145, 70000, 'Gurame Panggang', 'UTM', 6),
(146, 23000, 'Pangsit Udang', 'UTM', 6),
(147, 46000, 'Cumi-cumi Goreng Special', 'UTM', 6),
(148, 45000, 'Kepiting Lembek Mentega', 'UTM', 6),
(149, 46000, 'Sayap Ayam Panggang', 'UTM', 6),
(150, 39000, 'Sayap Ayam Jala-Jala', 'UTM', 6),
(151, 42000, 'Sui Kiau Goreng Salad', 'PNP', 6),
(152, 35000, 'Ha Kaou Sayuran', 'PNP', 6),
(153, 46000, 'Gyumaki', 'UTM', 7),
(154, 52000, 'Kaki Age', 'UTM', 7),
(155, 47570, 'Gyu No Tataki', 'UTM', 7),
(156, 35510, 'Yasai Itami', 'UTM', 7),
(157, 32000, 'Oshinko', 'UTM', 7),
(158, 34000, 'Kaisen Salad', 'PNP', 7),
(159, 88440, 'Tori No Teriyaki', 'UTM', 7),
(160, 84000, 'Tuna Maki', 'UTM', 7),
(161, 67500, 'Yakiudon', 'PBK', 7),
(162, 87000, 'Kaisen Yakiudon', 'PBK', 7),
(163, 92450, 'Nabe-yaki Udon', 'PBK', 7),
(164, 13500, 'Juice Mangga', 'PNP', ,
(165, 18000, 'Juice Strawberry', 'PNP', ,
(166, 21000, 'Blue Sky', 'PNP', ,
(167, 13500, 'Juice Alpukat', 'PNP', ,
(168, 16000, 'Buah Potong Kecil', 'PNP', ,
(169, 16000, 'Jus Sirsak', 'PNP', ,
(170, 25000, 'Cah Kangkung Udang + Nasi', 'UTM', ,
(171, 21000, 'Cincang Krani + Nasi', 'UTM', ,
(172, 25000, 'Pangsit Udang', 'UTM', ,
(173, 21000, 'Ayam Gulai + Nasi', 'UTM', ,
(174, 23000, 'Udang Goreng Tepung ', 'UTM', ,
(175, 15000, 'Ayam pop Garuda', 'UTM', 7),
(176, 13000, 'Dendeng Brekele', 'UTM', ,
(177, 7000, 'Tea Manis Dingin', 'PBK', ,
(178, 8500, 'Lemon Tea Hangat', 'PBK', ,
(179, 4000, 'Tempe Bacem', 'PBK', ,
(180, 13000, 'Juice Mangga', 'PNP', 9),
(181, 17000, 'Juice Strawberry', 'PNP', 9),
(182, 15000, 'Blue Sky', 'PNP', 9),
(183, 13500, 'Juice Alpukat', 'PNP', 9),
(184, 8000, 'Es Lemon Tea', 'PBK', 9),
(185, 13500, 'Jus Sirsak', 'UTM', 9),
(186, 13500, 'Coffee Mix', 'PBK', 9),
(187, 8600, 'Pudding ', 'PNP', 9),
(188, 8000, 'Cappucino Float', 'PBK', 9),
(189, 8500, 'Avocado Float', 'PBK', 9),
(193, 15000, 'Soto Udang + Nasi', 'UTM', 2);

-- --------------------------------------------------------

--
-- Table structure for table `restoran`
--

CREATE TABLE IF NOT EXISTS `restoran` (
  `id_restoran` int(3) NOT NULL AUTO_INCREMENT,
  `nama_restoran` varchar(150) NOT NULL,
  `alamat` varchar(200) NOT NULL,
  `gambar` varchar(250) NOT NULL,
  PRIMARY KEY (`id_restoran`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=14 ;

--
-- Dumping data for table `restoran`
--

INSERT INTO `restoran` (`id_restoran`, `nama_restoran`, `alamat`, `gambar`) VALUES
(1, 'Japanese Restauran Atami Medan', 'Hotel Danau Toba Medan', ''),
(2, 'Warung Nenek', 'Ring Road Medan', ''),
(3, 'Restoran bumbu desa', 'Jl. Gajah Mada no.35. Medan', ''),
(4, 'Restoran koki Sunda Medan', 'Jl. Hasanuddin Medan', ''),
(5, 'Joko Solo Medan', 'Jl. Sei Batang Hari', ''),
(6, 'Sari Nelayan Medan', 'Plaza Medan Fair Gatot Subroto', ''),
(7, 'Shusi Tei Japanese Restaurant Medan', 'Sun Plaza lower ground Medan City', ''),
(8, 'Restoran Garuda Medan', 'Jalan Gajah Mada, Medan', ''),
(9, 'Tip Top Medan', 'Jalan A.Yani (Kesawan) Medan', ''),
(10, 'Ayam Penyet Surabaya', 'Jl. Dr. Mansyur Medan', ''),
(11, 'Rumah Makan Nasi Kapau Uni Eli ', 'Jl. Wahidin No. 13 Medan timor', ''),
(13, 'Ayam Bakar K-Q 5', 'Jl. Dr. Mansyur No. 13 Kec. Medan Selayang', '');

 

my data base...  :D .. please help!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.