-
Posts
16,168 -
Joined
-
Last visited
-
Days Won
4
Everything posted by fenway
-
Looking for easier mysql code..It takes way too long to conclude.
fenway replied to don's topic in MySQL Help
Mixing RIGHT and LEFT joins? Good luck debugging that -- stay consistent, use only LEFT join. -
URGENT - Server has locked my index file for overloading mySQL!
fenway replied to hedgehog90's topic in MySQL Help
Everything depends on circumstances. What I meant was that if the query was going to be a good choice based on index availability, then adding a LIMIT will likely be optimized. And the converse is definitely true -- without ORDER by, you're getting back a large number of records, which is much slower anyway, regardless. -
I meant the expression you're evaluating, not the clause itself.
-
Merging Databases Into Master Database And Keeping Child Databases
fenway replied to proggR's topic in Application Design
Sorry, I don't follow -- but perhaps this belongs in the app design board.... -
You could technically order on STR_TO_DATE( strMonth, '%M %Y' ).
-
If they're all related, one database.
-
Use a proper DATE field, and this won't be an issue. Technically, there's a way to achieve this, but it's such a bad idea that I'll spare you.
-
You can -- and should -- easily check with an equivalent select. And don't use a reserved keyword for a column name.
-
Shouldn't be -- a few split() and you should be on your way.
-
Converting from Postgres to MySQL PHP question
fenway replied to in_titusville's topic in MySQL Help
Topic locked. -
Converting from Postgres to MySQL PHP question
fenway replied to in_titusville's topic in MySQL Help
First, I don't "claim" to have 13K+ posts -- I actually do. And the only reason I brought this up was to give you a chance to recognize that you weren't being singled out, not to assert my membership in what you perceive as a "good old boys club". Second, they all aren't like that post -- which you'd know if you'd actually bothered to check -- because not everyone is walking on eggshells around here like you appear to be. Third, asking if you'd followed the forum guidelines is not a dumb-@$$ remark -- it's a legitimate question, whether you think so or not. Again, I didn't say RTFM, which would have been wholly inappropriate. Fourth, as a Moderator, it's actually my job to ensure that these guidelines are followed -- so I couldn't "not post anything" as you suggest -- and I even provided a link (which has been in my sig for years, BTW) to let you (and everyone else) know where to look to review them in case you'd inadvertently overlooked them. Fifth, since the answer was easily obtained from the PHP manual, my response was a direct indication of how to obtain the knowledge you were seeking -- so I disagree that it was of "no help to anyone else". On the contrary -- now everyone knows where to look -- including you. Lastly, you already said you weren't going to visit this site anymore, which clearly wasn't truthful. But if you truly feel the need to get in the last word, go right ahead -- I won't lock this thread to prevent you from responding, but I won't respond to any more of this banter, either. And I am a man of my word, so you needn't worry. Just remember, if you hold up your end of the bargain, your final post will the only thing that future members will ever associate with your short-lived presence on PHPFreaks -- so consider your words carefully. Unless, of course, you decide to contribute in a positive manner to this community in the future. The ball's in your court -- the floor is all yours. -
Converting from Postgres to MySQL PHP question
fenway replied to in_titusville's topic in MySQL Help
If you can't see the value of my clarification, then I won't waste those precious "computer bits". But like I said, your loss, not ours. Sigh... I really don't see why people in general are so easily offended online compared to real-life -- not everyone's out to get you. EDIT: incidentally, the name-calling in a PM is really mature. For the record, a "jerk" is a "dull stupid fatuous person", and I am none of those three things, so you're way off-base. If you really have an issue with me, then feel free to complain to the rest of the staff -- you'll see that the general consensus is that you're simply over-reacting. Hey, it happens. -
Again, the only DB concern is speed -- and that only matters if you're trying to extract a single piece of information from this aggregate field. If you aren't, then storing it all in one big field isn't a bad idea. And it will be the same "size" regardless of how you store it -- in fact, probably larger if you normalize it unnecessarily.
-
SUBSTRING_INDEX() is your friend.
-
Converting from Postgres to MySQL PHP question
fenway replied to in_titusville's topic in MySQL Help
Really? You think making everyone read the rules constitutes harassment? That's like complaining that having to know the speed limit is harassment. [Aside: see section 1(ii) of the forum guidelines in the ToS -- not searching that manual counts.] Incidentally, telling you how to find the answer is just as good, if not better, than the answer itself, so it's not like you didn't get the help you needed -- just perhaps not the help you expected. But don't apologize to me -- this isn't a Q&A forum, it's a community. Which means that everyone has to play by the rules. If you don't want to, or aren't interested in hearing that there are rules, that's your problem, not mine, and not the community's. Incidentally, I didn't say RTFM -- I just asked an innocent question to gauge how much you had investigated prior to posting. If you want to be defensive, fine. But if you take the time to read my 13K+ posts, you'll find that I'm one of the least offensive veteran members here. Of course, that's only if you decide to stay -- which you should, since this is quite the active PHP community. -
Converting from Postgres to MySQL PHP question
fenway replied to in_titusville's topic in MySQL Help
Well, since the equivalent function is called mysql_result(), with the same parameter order, and a quick search of the php reference manual on "pg_result" lists the aforementioned function, I found that hard to believe. Besides, I don't see how that qualified as $*!-chewing. -
Converting from Postgres to MySQL PHP question
fenway replied to in_titusville's topic in MySQL Help
Did you even look? -
I am trying to make a blog but I get a syntax error.
fenway replied to coolcam262's topic in MySQL Help
You've also just given everyone your DB credentials -- so change them. -
STR_TO_DATE() -- but don't store DATE values in CHAR fields.
-
Drop the GROUP BY, move the having expression to your select list, and see if you get what you expect.
-
It really depends what you're trying to do with this. If you're never going to query individual values, just delimit the values somehow, and store it in one giant TEXT field. Otherwise, yes.
-
My apologies -- I was thinking of LONGTEXT, not TEXT. You were correct -- and I wasn't even drunk