Home Answers Viewqa PHP Select data from diplicated data

 
 


ganpurev
Select data from diplicated data
0 Answer(s)      6 months and 2 days 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'];

}
View Answers









Related Pages:
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
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
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
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
Select from select list + display
=st.executeQuery("select * from emp where EMP_NO="+id+""); while(rs.next()) { data...Select from select list + display  i have a select list containing... select EmpCode from the select list, the corresponding EmpName and DeptName should
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
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
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
DATA BASE
:3306/test", "root", "root" ); String sql = "Select name,address from data...DATA BASE  Create a program to establish a connection to the PCTBC... the data using a J Table.   Here is a code that connects to MySql
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
mysql select from multiple tables
mysql select from multiple tables   how can i select the date field from multiple tables in mysql?   "UNION" can be used to select data from multiple tables in my sql... for example (SELECT * from name where `name
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"> <
insert data
and as well as the passed data from mulitpart/form-data is greater than or equal to 0...insert data  i've got a problem to insert my data to database.i can...;<select name="start" size="1" > <option>
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
select query
select query  how to write select query with where clause having multiple variables. example: i want to select the data from DB in which i want to check againest two variable in where cluase. String sql = "select * from
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
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
Column select
or no. Then using the query select * from resumes where experience='yes', fetch all the data...("jdbc:mysql://localhost:3306/test", "root", "root"); String query = "select * from... years of experience does candidate have. Then using the query Select * from
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
Using Select Statements in JDBC
; The SELECT statement is used to select data from a table. For terminating a statement, semicolon is used. When we want to fetch the data from any table...: SELECT * FROM employee; This Example SelectState.java
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
Hibernate Select Clause
Hibernate Select Clause       In this lesson we will write example code to select the data from Insurance table using Hibernate Select Clause. The select clause picks up
SEARCHING THE DATA FROM DATABASE AND DISPLAY THE SEARCHED DATA IN HTML PAGE
the user specified $data = mysql_query("SELECT * FROM book WHERE upper($field...SEARCHING THE DATA FROM DATABASE AND DISPLAY THE SEARCHED DATA IN HTML PAGE  pls help me....in this i want to search books from the database
code for selected checkbox columns data from database
code for selected checkbox columns data from database  in my page iam getting all column names of a particular table with checkboxes. when iam select one or more checkboxes i have to get data of that selected columns only. what
Function data from web in MS excel
Function data from web in MS excel  Hello, I would like to import data from one webpage to Excel using function Data - From Web. The problem is that this web page has at the end .jsp . When I open it via Excel, click to data
fetch data from ms acces - Swing AWT
(); ResultSet rs=st.executeQuery("select * from data "); while(rs.next...fetch data from ms acces  How do i fetch back AUTO generated key from MS ACCESS table after inserting data through the java panel.... Please Help
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
how to get data from database into dropdownlist in jsp
how to get data from database into dropdownlist in jsp  //Customer Name: <select name="name"> <% try{ Class.forName...="select * from staff"; ResultSet rs=st.executeQuery(sql); while(rs.next
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
how to get data from database into dropdownlist in jsp
how to get data from database into dropdownlist in jsp  Customer Name:<select name="name"> <% try{ Class.forName...=con.createStatement(); String sql="select * from staff"; ResultSet rs
IPhone-UIPicker Data to TextField
IPhone-UIPicker Data to TextField  When I select the textfield, a picker view must come in form of action sheet and the data selected from that picker view must be populated in the text field. can anyone help me on this please
Retrieve data from databse using where in JSP
Retrieve data from databse using where in JSP  Hi, can somebody help me? I have a jsp page. in that i want to get data from the database where...=request.getParameter("username"); String sql; sql="SELECT * FROM register WHERE
retrieve data from mysql database and store it in a variable ?
retrieve data from mysql database and store it in a variable ?  sir , I am working on a project , in which I have to apply operation on input data...=conn.createStatement(); ResultSet rs=st.executeQuery("select * from numbers
Exporting data from mysql to csv file
Exporting data from mysql to csv file  Hi friends.... I want to export the data from mysql to csv file... i am having 30 columns in my database.. Eg... example that retrieves the data from the database and save it into csv file
Retrieve data from database in swing application
(); ResultSet rs=st.executeQuery("select * from data where id=1"); while...Retrieve data from database in swing application  I want to retrive data(doctor name,specilization,date) from my sql database
for store data in data base - JSP-Servlet
strQuery = "select count(*) from login where username='"+userName...for store data in data base  i want to a job site, in this site user..... and on 3rd form i use submit button... data of form 1 and 2 can also be store
Display Data from Database in JSP
; <html> <head> <title>display data from...;To display all the data from the table click here...</h2></TD>...; <font size="4" color="blue">show data from table<
jfreechart display from access database data.
jfreechart display from access database data.  I have made a database... to retrieve the data from the access database using prepared statement and then display...="org.jfree.data.jdbc.JDBCCategoryDataset"%> <% String query="SELECT * from chart
data are not display in JSP from database - JSP-Servlet
data are not display in JSP from database   i want to finding some data through a SQL query from SQL server database to a JSP page based on some.... one.jsp value of 'school' request parameter are comming from the link
how to get data from database into dropdownlist in jsp
how to get data from database into dropdownlist in jsp  Can anybody tell me what is the problem in this code as i am not able to fetch the data from...=con.createStatement(); String sql="select * from staff"; ResultSet rs
data copy - SQL
data copy   how to copy values of one column from one table into another column of another table?  Hi INSERT INTO table_name (column_name) AS SELECT DISTINCT VALUES FROM table_name (column_name
jsp programe for displaying data from database
"')"); ResultSet rs = stmt.executeQuery( "SELECT * FROM data"); String id...jsp programe for displaying data from database  i am using JSP.i want.../WebSevices/19592-retriving-data-from-sql-server-using-jsp-code-and-placing-them
jsp programe for displaying data from database
"')"); ResultSet rs = stmt.executeQuery( "SELECT * FROM data"); String id...jsp programe for displaying data from database  i am using JSP.i want.../WebSevices/19592-retriving-data-from-sql-server-using-jsp-code-and-placing-them

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.