want mysql queries for the shown database tables

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
karthikam
Forum Newbie
Posts: 2
Joined: Tue Apr 21, 2009 9:12 am

want mysql queries for the shown database tables

Post by karthikam »

I need mysql queries for the following :

(A)i have table with column headings emp name and password
sno empname password
1 ani abcdefgh
2 venus bcde
3 joe bcdef
4 mary abcdef





Q1:I want a mysql query to select and display the passoword whose character length is from 3 to 6 (i.e bcde,bcdef..)

Q2:I want query to select the password whose second letter is c,third is d and ends with e

Q3:I want the query that combines the two above said questions

(B)i have the following database table

code place pincode
1 milli 641035
2 madurai 641045

Q1: i want query to select and display the following

mil35
"du10"

(Note:mil35 is the first three letters of place milli and last 2 digits of pin code 641035--first row
du is third and fourth letter of place madurai and third and fourth digit of 641045--second row)

(C)I have the following table

code empname status
1 ven inactive,active
2 bruce active
3 lary inactive,active

Q1: i want the query to make the status of " bruce" to "inactive" and lary's status to "active"
tech603
Forum Commoner
Posts: 84
Joined: Thu Mar 19, 2009 12:27 am

Re: want mysql queries for the shown database tables

Post by tech603 »

This link can help you with php and mysql.
http://www.w3schools.com/PHP/php_mysql_intro.asp
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: want mysql queries for the shown database tables

Post by McInfo »

Why do these questions have the tone of a homework assignment?

Edit: This post was recovered from search engine cache.
Post Reply