alin19 Posted January 30, 2008 Share Posted January 30, 2008 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 More sharing options...
pdkv2 Posted January 30, 2008 Share Posted January 30, 2008 The database structure you have given is not clear enough to solve your query. Link to comment https://forums.phpfreaks.com/topic/88536-mysql-query/#findComment-453243 Share on other sites More sharing options...
Prismatic Posted January 30, 2008 Share Posted January 30, 2008 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 More sharing options...
alin19 Posted January 30, 2008 Author Share Posted January 30, 2008 $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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.