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
https://forums.phpfreaks.com/topic/88536-mysql-query/
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
https://forums.phpfreaks.com/topic/88536-mysql-query/#findComment-453244
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
https://forums.phpfreaks.com/topic/88536-mysql-query/#findComment-453256
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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