Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa PHP Select data from diplicated data

Have Programming Question? Ask it here!
 
 
 


ganpurev
Select data from diplicated data
0 Answer(s)      a year and 9 months ago
Posted in : PHP


hello i have table

  • location duration
  • msce 18:00
  • smc 13:00
  • msce 5:00

i need to get msce 23:00 how go get like this?

the code is

if(isset($_GET["id"]))
    {
        $id= $_GET["id"];}

    if(isset($_GET["is"]))
    {
        $is= $_GET["is"];}


    $user_name = "root";
    $password = "";
    $database = "test";
    $server = "127.0.0.1";

$db_handle = mysql_connect($server, $user_name, $password);

$db_found = mysql_select_db($database, $db_handle);

if ($db_found) {


$SQL = "SELECT location FROM (".$is.")  WHERE sub_cat=('".$id."')";
$result = mysql_query($SQL);

 $scs_count='0';
$cs="0";
$location=array();
while ($db_field = mysql_fetch_array($result)) {
$location_c[$cs]= $db_field['location'];

$cs++;
$scs_count++;
}

$duration_c=array();
$cks="0";
for($k=0;$k<$cs;$k++)
{ 

$SQL = "SELECT duration FROM core_network WHERE location=('".$location_c[$k]."')";
$result = mysql_query($SQL);

$db_field = mysql_fetch_array($result);
$duration_c[$k]= $db_field['duration'];

}

Advertisement
View Answers

Related Tutorials/Questions & Answers:
Select data from diplicated data
Select data from diplicated data  hello i have table location...++) { $SQL = "SELECT duration FROM core_network WHERE location=('".$location_c[$k... = mysql_select_db($database, $db_handle); if ($db_found) { $SQL = "SELECT
Select data from Table in Database
Select data from Table in Database   ... the selected data from table in database. The select query in the database retrieve...; in simple select statement is given below select column name from table
Advertisements
Select tag to fetch data from oracle database
Select tag to fetch data from oracle database  I created a select box having more than one menus in the select box such as regnno, address and name of a student and when regnno is selected from the drop down list by a user
Proplem with select data - Struts
Proplem with select data  Hi , Please can u give me a example for display all data from the database (Access or MySql) using Struts
Use of Select Box to show the data from database
Use of Select Box to show the data from database       Example program using Select Box to show retrieved data from database This example will describe you the use of Select Box in a JSP
Select Employee and display data from access database in a jtable
Select Employee and display data from access database in a jtable  I there Iam a java beginner. I have to create a application where I can select a employee's name from a comboBox and the jtable will be filled with all
selecting data from database
selecting data from database  how to select data from database using Dao in struts   Hi, You have to load the data from database using hibernate and send the data in a Java file object to jsp page. Please read at http
extract data from HTML
extract data from HTML  how to write the coding for to extract data from html tags like(h3,p) and then extracted data should be stored in data base? can anybody tell me how to write the coding
Data from multiple ResultSets?
Data from multiple ResultSets?  hello, How can I get data from multiple ResultSets?   Hi, You can iterate the ResultSet separately and get the required data. Thanks
retrive data from database
retrive data from database   hi.. i made a application form. it's have attribute s.no,name,roll no and i enter a few records. now i want to view all record not in database access sheet i want to view it at any another
Insert Data From File
Insert Data From File       Insert Data From File is  used to insert data from file... to insert data from file. To understand this example, we create a table 'Stu_Table
retrive data from database?
retrive data from database?  hellow i have a database sheet name as db1. it's contain sixty(60) sn,name ,rollno(primary key),father's name etc... from db1 and enter value in text box according there name,rollno and save
data
data  Handling data
Retrieve The Data From MySql Datbase
Retrieve The Data From MySql Datbase   How to Retrieve The Data From MYSQL database TO Use Select the Emp_id Option.And Also Search Option
data
data  Handling data in AOP
data
data  data Handling AOP
data
data handling examples in AOP Model  data handling examples in AOP Model
Insert Data From File
Insert Data From File       Insert Data From File is  used to insert data from file... to insert data from file. To understand this example, we create a table 'Stu_Table
To retrive data from database - Struts
To retrive data from database  How to get values ,when i select a select box in jsp and has to get values in textbox automatically from database? eg:I have three tables in database,and in jsp page if i select courseid in select
How to select Data Between Two dates in Java, MySQL
How to select Data Between Two dates in Java, MySQL  How to select Data Between Two dates in Java, MySQL? Thanks in advance.   http://www.v7n.com/forums/coding-forum/294668-how-select-data-between-two-dates-php
how to retrieve data from database ?????/
how to retrieve data from database ?????/  how to retrieve data from database
how to retrieve data from database ?????/
how to retrieve data from database ?????/  how to retrieve data from database
how to retrieve data from database ?????/
how to retrieve data from database ?????/  how to retrieve data from database
how to retrieve data from database ?????/
how to retrieve data from database ?????/  how to retrieve data from database
how to fetch data from servlet ????
how to fetch data from servlet ????  how to fetch data from servlet
fetch data from database in javascript
fetch data from database in javascript   How to fetch data from database in JavaScript when it is a leap year
Getting data from servlet into javascript
Getting data from servlet into javascript  How do i get json data from my servlet on to a variable in javascript n bind the data to display onto sigma grid.Has anyone Idea how to do
how to retrieve data from database
how to retrieve data from database  unable to retrieve data from database using mySQL by using jsp sessions and beans for editing
read data from Excel sheet
read data from Excel sheet  Hi, How to read data from an excel sheet using JSP. Thank you
Purge Data from Mysql tables
Purge Data from Mysql tables  Hi, i have to write a mysql procedure to purge data from tables. but written procedure clear entire tables data...; DELETE FROM conference_table WHERE confrefno= confRefNo; SELECT COUNT(listid
FAILED TO INSERT DATA FROM FUNCTION();
FAILED TO INSERT DATA FROM FUNCTION();  HELLO, I HAVE A PROBLEM TO INSERT DATA FROM OUTPUT FROM FUNCTION()... I WANT TO STORE THE OUTPUT IN DATABASE... totalMac_ac1(){ $query1 = "SELECT AVG(MAC) FROM academia1"; $result1
Data extraction from an image file.
Data extraction from an image file.  I have made an image... data from the the image which also include deleted data.Can i used java to extract these data from the image file? Which are the libraries to be used
retrieve data from mysql database
retrieve data from mysql database  hi am not familiar in php.....even... selected value on combobox which is to be retrieve the relevant data from mysql...;method="post"> <select id="inputfield" name="term" size="1"> <
delete data from database - SQL
delete data from database  HOw to delete specific data from table> I want to delete one record from database. Thnx  Hi friend, -------------------------------------------- Visit for more information
store data from a variable in mysql?
store data from a variable in mysql?  sir last time asked you tell me how to retrieve data from a database mysql and store it in an int variable...=conn.createStatement(); ResultSet rs=st.executeQuery("select * from numbers
Problem in accessing data from Database
Problem in accessing data from Database  hi..... i'm making a project... is text and all others are of currency data type. If i enter 0 or null value in currency column and then try to retrieve data using my servlet coding
retrive data from oracle to jsp
retrive data from oracle to jsp  i am a beginer in jsp so please help...(); psmt= conn.prepareStatement("select * from CR_EMPLOYEE_DETAILS... cost and manager name and storing it in the data base. in search proj fiel
retreive integer data from database
retreive integer data from database  i made a table named result...=lalit&database=mydb"); String url="select marks from student where rollno... and two buttons "ok" and "cancel" i want to take input from textfield
Data retrieve from mysql database
Data retrieve from mysql database  Hi sir, please give some example... from the dropdown, related data will get displayed on the textboxes. Here we have... = DriverManager.getConnection(url+dbName,userName,password); String query = "select * from
Getting Textbox data from database
Getting Textbox data from database  When i m trying to get data...=stmt.executeQuery("select fname,empid from cremp where empid='"+empid... data from database and display it on the textboxes. <%@page language="java
Retrive the data from the table in data base using jdbc
Retrive the data from the table in data base using jdbc  Retrive the data from the table in data base using jdbc   JDBC Tutorials
retrieve data from database with hyperlink
retrieve data from database with hyperlink  sir....i have one table called 'name' having two values i have to retrieve those data with a hyperlink and show in browser and if we click hyperlink its shows his sub categories....how
Getting Textbox data from database
Getting Textbox data from database  When i m trying to get data...(); rs=stmt.executeQuery("select fname,empid from cremp where empid='"+empid...;Here is a jsp code that retrieves data from database and display
Retrieving data from data base using jsp combo box
Retrieving data from data base using jsp combo box  Hi guys please... different version of the servers once i select the server type and version of the server it has to display the process name from database into the process name
Retrieving specific data from excel
Retrieving specific data from excel  Hello everyone, i have written a simple code to retrieve data from excel sheet and working fine, the excel file... first sheet from the workbook HSSFSheet sheet = workbook.getSheetAt(0
GWT -- retrive the data from Database
GWT -- retrive the data from Database  the user can create an event. In the create page, we have three buttons. Save as draft, preview and save... button, you have to create a dynamic jsp which should read the contents from
view data from jTextArea to jtable
view data from jTextArea to jtable  good night Please help senior java all, I want to make a brief program of reading data in the text area and then on the show to the j table. I created a new scrip like below but it does
How you will Show all data from a table.
How you will Show all data from a table.   How you will Show all data from a table.   Hi, following query is used to show all the data of the table- SELECT * FROM tablename; Thanks
retreiving data from microsoft access database
retreiving data from microsoft access database  How can i retrieve data from microsoft access when i have select the vaules in combo box and text box. When i select these values... i want to retrieve the corresponding columns
use data from database as hyperlink and pass the data in the hyperlink
use data from database as hyperlink and pass the data in the hyperlink  Hi Friends, I am using the data from database as hyperlink and pass the data... and parameter value I wrote a logic to get it from the column data. The logic works
Advertisements
 

 

 

DMCA.com