-
Posts
16,168 -
Joined
-
Last visited
-
Days Won
4
Posts posted by fenway
-
-
What does 'not working' mean
-
Besides, when are you forced to use a 'single query'?
-
This has nothing to do with mysql, or even php.
-
I think I'm getting somewhere. I run this direct on the database (just basic queries with no extra stuff added):
SELECT id FROM ((SELECT id FROM TABLE1) UNION (SELECT id FROM TABLE2))
I get this:
Every derived table must have its own aliasAlso, why the extra select at all?
-
Well, you can add 'fake' columns with UNION.
-
Those queries aren't doing what you think.
Post EXPLAINS, and then explain in words what you're trying to achieve.
-
You're paying for this service -- talk to your provider.
-
You're new -- I suggest you re-read the posting rules.
You can start by not posting your scripts.
-
NOT IN is evil -- use LEFT JOIN... IS NULL.
-
MySQL won't skip them -- unless you add them, then delete them -- or specify a value.
-
Pythagoras works wells.
-
This isn't a new problem -- but there's no reliable solution. At some point, you're going to have to create a mapping from companyN to your internal naming convention for each product X -- there's really no way about it.
If N is small, then even if X is large, deltaX -- the number of products that (a) change names or (b) are added [deleted doesn't count] -- is likely to be small as well.
The initial mappings will be painful -- but a multi-pass approach should reduce the workload by about 95%. Afterwards, it's a one-off, which is easy to get a client to do.
-
just tell me
I never worked with mysql
Why should we 'just tell you' -- this is site for people to exchange ideas -- not a site to demand answers.
If you really don't understand these comments, then this isn't your script. Which means you shouldn't be changing it without understanding how it works.
-
We can't infer your table structure from *.
-
Also, that just wastes CPU cycles -- you don't need all those trig functions unless you're using huge distances.
-
Please recognize that it's called 'auto'-increment -- which means you're not supposed to give it a value.
If you are, you've chosen the wrong field -- but I could have told you that from your choice of ZEROFILL.
-
"SELECT clan1.name AS clan1Name, clan2.name AS clan2Name FROM ".PREFIX."cup_matches AS matches INNER JOIN SELECT name FROM ".PREFIX."cup_all_clans` AS clan1 ON ( clan1.ID = matches.clan1 ) INNER JOIN SELECT name FROM ".PREFIX."cup_all_clans` AS clan2 ON ( clan2.ID = matches.clan2 ) WHERE matches.cupID=$cupID"
Should do the trick.
-
I'm really not sure where your getting your syntax from.
Transact-SQL.
-
Don't try and roll-your-own F.T. index -- that REGEXP won't work at the end of the column.
-
That table is already being joined....?
-
If you want to debug SUMs, drop the SUM/GROUP BY and inspect individual rows.
-
MySQL's RE capabilities are extremely limited -- though there are some pretty powerful UDFs available as plugins.
-
I have never tried. I would pay for someone to help me. I know it is easy.
If you want to pay, you've come to the wrong place.
-
And SQL would have produced a syntax error -- which clearly wasn't checked.
Rank change since last update
in MySQL Help
Posted
Again, you haven't told us what you're trying to -- you're telling us why what you're written doesn't work.