mysql query

mysql query

View Answers

January 22, 2009 at 3:24 AM

Hi kathiresan..


Here is the php code which solve your problem..

<?php
$con = mysql_connect("localhost","root","root");
if (!$con){
die('Could not connect: ' . mysql_error());
}

mysql_select_db("test", $con);
$result = mysql_query("SELECT * FROM roseindia WHERE age BETWEEN '20' AND '30'");

while($row = mysql_fetch_array($result)){
echo $row['first_name'] . " " . $row['last_name']."<br>";
echo $row['age']." Years";
echo "<br><br>";
}
?>

Thanks........









Related Tutorials/Questions & Answers:
Query to Test MySQL Performance
Query to Test MySQL Performance  Query to Test MySQL Performance
mysql query
mysql query  how do transfer into the excel data to my sql  ... with ("jdbc:odbc:excel"). Execute query "select name, address from [Sheet1$]". Here... the mysql connection in your php and store the list values inside the mysql
Advertisements
select query in mysql
select query in mysql  Select query in mysql. Can anyone
mysql query
mysql query  I have two tables namely sms and bdpaidbribe. I want to insert a column "Message" of sms table into "caddiinfo" column of bdpaidbribe table. and whenever the Message is inserted into sms table it should automatically
insert query in mysql
insert query in mysql  insert query in mysql not working   [INSERT INTO Birthdays(firstname, lastname, birthday, group) VALUES('Sam','Smith','June','Junior
mysql query for null value
mysql query for null value   What mysql query for null value i need to write to display message when no data in database? Please help.Thanks!   if(mysql_num_rows($data2) > 0){ //while loop goes here } else
mysql query - WebSevices
mysql query  From your answer for my last post "SELECT * FROM roseindia WHERE age BETWEEN '20' AND '30' " If the age field... we compare with from and to ages?.  Hi... U May create your query
Where clause with query in MySQL
Where clause with query in MySQL  Hi, I want to learn the where clause in MySQL. Provide me the tutorials. Thanks   Hi, Here... | +------------+-----------+----------------------+-------------+ The you can use the following query to get one
AND and OR Operators in MySQL Query
AND and OR Operators in MySQL Query  Hi, How to use the AND and OR Operators in MySQL Query? Thanks   Hi, We have a table with following...='Rajeev'); Here is the full log of MySQL client when these queries are run
PHP MySQL query
PHP MySQL query  I have 11 tables and have to do the CRUD operations keeping userid as a reference key
range of dates in mysql query
range of dates in mysql query  How to select the range of dates in mysql ..when i have to select from between & and of date function?   SELECT * FROM MAAccounts WHERE updatedOn BETWEEN ? AND ? ORDER
Function mysql_db_query() is deprecated
Function mysql_db_query() is deprecated  Hi, In latest version of PHP Function mysqldbquery() is deprecated. What could be the solution? Thanks
Function mysql_db_query() is deprecated
Function mysql_db_query() is deprecated  Hi, In latest version of PHP Function mysqldbquery() is deprecated. What could be the solution? Thanks
mysql query - WebSevices
mysql query  I have a field in database as DOB. But I want to search recrods as per "fromage" to "toage". I dont know how to compare the ages with DOB field and retrieve records. plese help me. in mysql with PHP  Hi
Mysql Date Query
Mysql Date Query       Mysql Date Query Date Query is used to return the current date, month and year... an example from 'Mysql Date Query'. To understand this example we use current
MySQL PHP Query delete
MySQL PHP Query delete       Mysql PHP Query delete is used to execute Mysql function ( ) delete query from a database table. MySQL PHP Query is used to delete the records
MySQL PHP Query delete
MySQL PHP Query delete       Mysql PHP Query delete is used to execute Mysql function ( ) delete query from a database table. MySQL PHP Query is used to delete the records
Mysql Minus Query
Mysql Minus Query       Mysql Minus Query is used to return the calculated value from subtracting... The Tutorial illustrate an example from 'Mysql Minus Query'. To understand
Mysql Minimum Query
Mysql Minimum Query       Mysql Minimum Query is useful when you want to return... The Tutorial makes you understand an example from 'Mysql Minimum Query'.To elaborate
Mysql Minimum Query
Mysql Minimum Query       Mysql Minimum Query is useful when you want to return the minimum value... understand an example from 'Mysql Minimum Query'. To elaborate more on it, we
Mysql Join Query
Mysql Join Query       Mysql Join Query is used to return the matchable records from ..._TO_REPLACE_1 The Tutorial illustrate an example from Mysql Join Query. To grasp this we
MySql Databse query to fetch results from database
MySql Databse query to fetch results from database  Hi. I have a field in database named stages. its datatype is varchar(60). It contains values chennai,trichy,kanchipuram for a single record. I have to retrieve these data from
Query to insert values in the empty fields in the last row of a table in Mysql database?
Query to insert values in the empty fields in the last row of a table in Mysql... row of my MYSQL database. Now I want to fill up those empty fields in the last row. So what will be the query
fetch record from MYsql table query
fetch record from MYsql table query  Hi. I have a field in database named stages. its datatype is varchar(60). It contains values chennai,trichy,kanchipuram for a single record. I have to retrieve these data from the field table
How to execute mysql query based on checkboxes values in java swing application.
How to execute mysql query based on checkboxes values in java swing... have to execute query based on selection of checkboxes.Means I have to to execute query acording to the checkbox. whichever checkbox is selected query should
How to execute mysql query based on checkboxes values in java swing application.
How to execute mysql query based on checkboxes values in java swing... have to execute query based on selection of checkboxes.Means I have to to execute query acording to the checkbox. whichever checkbox is selected query should
How to execute mysql query based on checkboxes values in java swing application.
How to execute mysql query based on checkboxes values in java swing... have to execute query based on selection of checkboxes.Means I have to to execute query acording to the checkbox. whichever checkbox is selected query should
MySql Databse query to fetch results from database and display it in HTML File
MySql Databse query to fetch results from database and display it in HTML File  Hi. I have a field in database named stages. its datatype is varchar(60). It contains values chennai,trichy,kanchipuram for a single record. I have
How to insert image in MySQL database using sql query?
Insert image in MySQL database using sql query  ... in MySQL database and then used the query to insert the data... tutorial of "How to insert image in MySQL database using sql query?": So
Mysql Not
. Query for Mysql not : select !0 : The !0 in the select Query is used to return... for Mysql not : select !1: The !1 in the select Query is used to return 0.ADS... Mysql Not       Mysql
urgent need for jsp code with mysql query for uploading and downloading file - JSP-Servlet
urgent need for jsp code with mysql query for uploading and downloading file  can anyone tell me how to upload and download a doc file using jsp with mysql as the back end... and kindly help me to create the table too
Mysql Last
Mysql Last       Mysql Last is used TO limit Mysql query result that fall in a specified range. The Query is used to show the first X number of results and show a range from X-Y
Mysql PHP Select
; Mysql PHP is used to execute the select statement using mysql_query ( ) function. The function send a query or command to a MySQL connection... query. Now we make use of mysql_fetch_array ( ) function to return the first row
MySQL BIGINT
MySQL BIGINT This example illustrates how to use the bigint data type in the MySQL query. In this example we create a table with column bigint data type.  ADS_TO_REPLACE_1 Query  
mysql
mysql  want the code for mysql nested select query with single where condition.want to select data from more than one table
MySql Query Example Tutorial
Query conversion
Query conversion  can please convert the following mysql query to hibernate query select * from table1 where field1 not in (select field_1 from table3
Mysql Date Today
Mysql Date Today       Mysql Date Today show you Query to retrieve the current today date. ... the current today date in Mysql. Query for finding the current date:-ADS
Mysql Date Add
an example from 'Mysql Date Add'. To grasp this example we use query AddDate... Mysql Date Add       Mysql Date Add is used to add the days  to the date specified
query
:mysql://localhost:3306/mysql","root", "root"); ResultSet rs = null; Statement...:mysql://localhost:3306/mysql","root", "root"); ResultSet rs = null; Statement st
How to send from netbeans gui registration form to MySQL query browser database?
How to send from netbeans gui registration form to MySQL query browser database?  Well i have a Registration form GUI in my netbeans. in my GUI.... in textField then click the button named "Register" will send it to my MySQL Query
How to send from netbeans gui registration form to MySQL query browser database?
How to send from netbeans gui registration form to MySQL query browser database?  Well i have a Registration form GUI in my netbeans. in my GUI.... in textField then click the button named "Register" will send it to my MySQL Query
Mysql Nested Select
; Mysql Nested Select is a SELECT query that is nested within a Select, Update... (0.00 sec) mysql> insert into MyTable values(07,'Q','26000'); Query...) Query for Mysql nested select: The Nested Query is used to return those records
MySQL Boolean Operator
MySQL Boolean Operator This example illustrates how to use the boolean operator 'NOT' in the MySQL query. In this example we create a PROCEDURE 'boolproc... Query   Output  
MySQL Blank Field
MySQL Blank Field This example illustrates how to find Blank field by the MySQL Query. In the table 'example' two t_count fields are blank and we find both field which has some value by query 'select * from example where t_count
Mysql Like Operator
Mysql Like Operator       Mysql Like is used to retrieve the records on the basis of pattern matching in select query. The like comparison Operator in SQL allows you
Mysql Like Operator
Mysql Like Operator       Mysql Like is used to retrieve the records on the basis of pattern matching in select query. The like comparison Operator in SQL allows you to match any
Mysql Last
Mysql Last       Mysql Last is used TO limit Mysql query result that fall in a specified range.The Query is used to show the first X number of results and show a range
Mysql like syntax
Mysql like syntax       Mysql Like is used to retrieve the records on the basis of pattern matching in select query. The like comparison Operator in SQL allows you
Mysql like syntax
Mysql like syntax       Mysql Like is used to retrieve the records on the basis of pattern matching in select query. The like comparison Operator in SQL allows you to match any

Ads