|
More site info...
|
|
Forum profile page for MySQL on http://www.sitepointforums.com.
This report page is the aggregated overview from a single forum: MySQL, located on the Message Board at http://www.sitepointforums.com.
This forum profile page summarizes the general forum statistics such as: Users Activity, Forum Activity, and Top Authors, which are reported in either a table or graph below for a given reporting time period.
Additional forum profile information for "MySQL" on the Message Board at http://www.sitepointforums.com is also shown in the following ways:
1) Latest Active Threads
2) Hot Threads for Last Week
Warning: These statistics are generated using 'best efforts' and can experience delays and reporting errors at times. Please note that such statistics do not constitute a forum's popularity and/or exact posting volumes at any given reporting period.
|
|
|
|
|
Posting activity on MySQL:
|
|
Week
|
Month
|
3 Months
|
|
Threads:
|
87
|
282
|
696
|
|
Post:
|
312
|
966
|
2,377
|
|
|
MySQL Posting activity graph:
|
Top authors during last week:
user's latest post:
3 tables join
Published (2009-11-26 09:19:00)
sorry, i have no idea what you just said
user's latest post:
Showing nos of event counts per...
Published (2009-11-24 11:13:00)
Quote: Originally Posted by r937 they're nice diagrams but they don't make sense without seeing the sample data (plus, the author loses credibility by allowing SPAM in the comments) here's another visualization: http://www.sitepoint.com/forums/show...2&postcount=18 this one has great sample data , but without the bubble diagrams But much more explanation and good example can be found at Simply Sql 's Join chapters
user's latest post:
3 tables join
Published (2009-11-26 09:51:00)
Ok i will try to explain better : This is the query : Code: SELECT something , anything , just_not_the_dreaded_evil_select_star FROM galobj AS g INNER JOIN fonti AS fnt ON fnt.fnt_id = g.fnt_id INNER JOIN ( SELECT fnt_id , MAX(frmt_id) AS latest FROM formati WHERE frmt_subtype = 'jpeg' AND frmt_extra1 >= 550 AND frmt_extra1 <= 650 AND frmt_extra2 >= 550 AND frmt_extra2 <= 650 GROUP BY fnt_id ) AS m ON...
user's latest post:
SQL query prob
Published (2009-11-23 05:35:00)
An error displayed : #1271 - Illegal mix of collations for operation ' IN ' SELECT * FROM cd WHERE week IN ('Te','Tev','Yed') Please advise.
user's latest post:
Select Where Not In Like ()
Published (2009-11-26 07:41:00)
MySQL Code: SELECT count ( * ) FROM tbl_name WHERE col1 NOT LIKE 'val1%' AND col1 NOT LIKE 'val2%' ;
user's latest post:
how to delete multiple records...
Published (2009-11-25 22:22:00)
Quote: Originally Posted by leelong is that mean all of the table 'id' field must have same number of rows? sadly i hv different number of id field each table, 'table1' 2 rows of id datas, 'table2' 1 row, 'table3' 100 rows ........etc No, it doesn't matter if the number of rows in one table is different from the number in another. The join syntax joins the tables if there are relative rows/records,...
user's latest post:
Update values from repeated table
Published (2009-11-19 05:58:00)
Hi Chaps, I have a Query that pulls data from 3 different job tables: Code: tbl_jobs - jobid (auto) primary key - jobinvsent (y,n) tbl_jobxml - jobid (auto) primary key - jobinvsent (y,n) tbl_jobtrans - jobid (auto) primary key - jobinvsent (y,n) I'm able to present the data in an HTML table, but what I need is the ability to update the values of jobinvsent to 'y' of all the jobid's presented. I'm guessing I'll...
user's latest post:
Help on Querying Specific...
Published (2009-11-22 03:02:00)
Dear r937 Thanks a lot for your help on this. It works like a charm. Instead of UNION ALL I've used UNION because I don't want to retrieve duplicate values on this case, mutatis mutantis, here is the final working code thanks to you: Code: SELECT p.id_prod, p.id_cat, p.nome_prod FROM produto p INNER JOIN categoria c ON c.id_cat = p.id_cat INNER JOIN categoria c2 ON c.parent_id_cat = c2.id_cat WHERE c2.parent_id_cat = 1 UNION SELECT...
user's latest post:
Complex (for me) query help.
Published (2009-11-26 23:27:00)
I'm trying to modify an existing query to count mails sent today by member_id1 to member_id2 (unique) that are NOT replies to an existing message from member_id2 (reply time frame of 7 days). Replies are just based on the "subject" field, if the Subject is the same it is considered a reply. The existing query is rather simple: SELECT * FROM messages WHERE member_id1=8 AND senddate>=" . mktime(0, 0, 0) ....
|
|
|
|
Latest active threads on MySQL::
Started 4 days, 17 hours ago (2009-11-23 22:19:00)
by resting
Ok, I'd got it to work with this:
PHP Code:
SELECT * FROM prod_info LEFT JOIN ( SELECT prod_id , XS , S , Splus , M , L , XL FROM prod_info AS outOfStock WHERE XS IS NULL && S IS NULL && Splus IS NULL && M IS NULL && L IS NULL && XL IS NULL ) AS outOfStock ON prod_info . prod_...
Started 17 hours, 55 minutes ago (2009-11-27 22:04:00)
by Dave McLovin
It may possibly be your firewall settings, or you may try unticking the Svc box in the control panel and then starting MySQL to see if you can get a better error message.
Or you may want to try looking here http://forums.mysql.com/read.php?35,...3 608#msg-33 608
Started 19 hours, 32 minutes ago (2009-11-27 20:27:00)
by r937
please provide sample data, preferably by dumping some rows from each table
then show us what the query should return based on your sample data
Started 1 day ago (2009-11-27 15:22:00)
by guido2004
MySQL Code:
SELECT ... FROM ( SELECT ... FROM images WHERE imageid < $imageid ORDER BY imageid DESC LIMIT 0 , 4 UNION SELECT .... FROM images WHERE imageid >= $imageid ORDER BY imageid ASC LIMIT 0 , 6 ) as A ORDER BY imageid
This will give you max 10 images. If there ...
Started 1 day, 8 hours ago (2009-11-27 07:46:00)
by SpacePhoenix
SQL Code:
SELECT table1.* , table2.f4 FROM table1 LEFT JOIN table2 ON table1.f1 = table2.f1
Started 1 day, 11 hours ago (2009-11-27 04:58:00)
by danNL
maybe this will help
http://bugs.mysql.com/bug.php?id=27645#c254993
Started 1 day, 9 hours ago (2009-11-27 06:03:00)
by r937
you're storing a comma-delimited string of values in the category_id
column? you are in for more problems than you realize...
Started 3 months, 2 weeks ago (2009-08-12 01:11:39)
by r937
Quote:
Originally Posted by djomla
i need just one, criteria should be the highest one
picking the latest for each group is a common requirement
you can see how it is done by joining to a subquery
Code:
SELECT something
, anything
, just_not_the_dreaded_evil_select_star
FROM galobj ...
Started 2 days, 8 hours ago (2009-11-26 07:41:00)
by guido2004
MySQL Code:
SELECT count ( * )
FROM tbl_name
WHERE col1 NOT LIKE 'val1%'
AND col1 NOT LIKE 'val2%' ;
|
|
Hot threads for last week on MySQL::
Started 5 days, 11 hours ago (2009-11-23 04:51:00)
by r937
Quote:
Originally Posted by dele454
If i change the WHERE clause to AND it returns all the subcategories in the db with the respective event counts.
i'm pretty sure that this is because you forgot the necessary parentheses around your AND and OR conditions
Code:
SELECT s.URLName
, s.SubCategoryID...
Started 1 week ago (2009-11-21 09:11:00)
by oikram
As an add on:
we are talking about a 1-n relationship.
And the deep level will be fixed.
Recursion can be used on the server side scripting side correct? I was just trying to see if, it's possible to use only mysql query and if so, what whould be the inconvenient? Database intensive? (It will be a low traffic website, no more then 1000 visits month I believe).
Thanks again,...
Started 5 days, 6 hours ago (2009-11-23 09:37:00)
by r937
you will need a couple LEFT OUTER
JOINs
Code:
FROM messages AS mfrom
LEFT OUTER
JOIN messages AS mto
ON mto.from = mfrom.to
LEFT OUTER
JOIN messages AS mreply
ON mreply.from = mto.to
AND mreply.to = mfrom.from
you would use WHERE mfrom.from = 8 to indicate the user who initiated the contact
you also need a GROUP BY, because you want to count the ...
Started 5 days, 11 hours ago (2009-11-23 04:33:00)
by r937
you cannot do it in one query unless the tables can all be joined
Started 4 days, 11 hours ago (2009-11-24 04:37:00)
by guido2004
Normalise your database and get rid of comma separated values in a column.
Started 1 day, 11 hours ago (2009-11-27 04:58:00)
by danNL
maybe this will help
http://bugs.mysql.com/bug.php?id=27645#c254993
Started 2 weeks ago (2009-11-13 21:48:00)
by r937
it all depends on which data you want back
are there any WHERE conditions?
if not, then it doesn't much matter which tables you start with
by the way, you might also want to take a moment and explain what your tables are for
what's a param?
Started 1 week, 2 days ago (2009-11-19 03:54:00)
by djomla
Ok I'm working with MySQL i don't know how MySQL handles this two fields as
primary and then other table with one field as foreign key to this two
fields?
Started 1 week, 1 day ago (2009-11-19 17:18:00)
by adammc
Nevermind, got it sorted using:
SELECT * FROM Categories WHERE cat_id != '21' AND cat_id != '22' ORDER BY category_name ASC
Started 5 days, 12 hours ago (2009-11-23 03:27:00)
by guido2004
|
|