Jump to content

mysql query


alin19

Recommended Posts

let's say i have a database

 

 

 

jannet    january    1

jannet    january    2

                            .....

jannet    february  1

                ......

 

mary      ianuary

mary      february

 

lee          ianuary

lee          february 

 

 

 

can i make a query like this: ?

 

 

SELECT * FROM `year2008` where month=january AND day=3  LIMIT 0 , 30  ?

 

Link to comment
Share on other sites

let's say i have a database

 

 

 

jannet    january    1

jannet    january    2

                            .....

jannet    february  1

                ......

 

mary      ianuary

mary      february

 

lee          ianuary

lee          february 

 

 

 

can i make a query like this: ?

 

 

SELECT * FROM `year2008` where month=january AND day=3  LIMIT 0 , 30  ?

 

 

Well, the query will run as long as your table "year2008' has a month, and day field.

 

The query should actually look like this

 

SELECT * FROM `year2008` where month='january' AND day=3  LIMIT 0 , 30

Link to comment
Share on other sites

$query="SELECT data FROM `year2008` WHERE data='14-ian-08' AND 'nr.cupoane'='2'  LIMIT 0 , 30";  -doesn't work

 

 

$query="SELECT data FROM `year2008` WHERE data='14-ian-08'  LIMIT 0 , 30";- works

 

 

and i have :

 

                         

 

                          data            nr.cupoane

        Edit  Delete  8-ian-08  4 

Edit Delete 9-ian-08 8

Edit Delete 10-ian-08 12

Edit Delete 11-ian-08 2

Edit Delete 14-ian-08 2

Edit Delete 15-ian-08 3

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.