-
Posts
16,168 -
Joined
-
Last visited
-
Days Won
4
Everything posted by fenway
-
I don't think you've helped yourself with that explanation -- start over. "Between records" doesn't mean anything. Give real examples of these condtions.
-
[SOLVED] Password generator not working with MySQL
fenway replied to bettina702's topic in MySQL Help
....? Oh. -
[SOLVED] elseif statements containing insert & update
fenway replied to karnegyhall's topic in MySQL Help
That doesn't prove anything. As suggested, echo the query so that we can see it. Then show us mysql_error() output. -
[SOLVED] elseif statements containing insert & update
fenway replied to karnegyhall's topic in MySQL Help
Prove that you're connected to the right DB. -
Well, let's wait for the OP to clarify.
-
Sure, finding numbers is faster than finding text -- but that's not column type choice now, is it? That's application logic in deciding which field(s) to search and/or index. And I too recommended against BIT -- but only because it's probably going to change later. If you know for certain it will only ever store 0 and 1, then BIT *is* the correct type. As for out-of-range, mysql will either issue a warning or an error, depending on the sql_mode. How you decide to handle those is your choice... but there's nothing more mysql can do for you.
-
Table crashed. Can data from just part of a backup be fed into a new table?
fenway replied to randalusa's topic in MySQL Help
You make the mistake of believing that how you view the world is how all people should. In my case, seeing so many pinned threads, I didn't even make it far enough to read all the titles. And you put the most important one (perhaps the only one important enough to be pinned) as the 6th in line. Well, here I agree with you -- TBH, I didn't even realize it was not the first one; that's a limitation of SMF forum software, which I will workaround to ensure that it's the first one somehow. Good idea. I'm not frustrated in the least -- it's the OP's who are constantly surprised that it's difficult to answer their questions that are the frustrated ones. I'm just trying to let them know why, and how they can try and help their own cause. Agreed, but I don't see how that's relevant. Au contraire. When a site is shut down, people unable to get their mail, a large investment at risk, I am fine qualifying the word emergency with the modifier coding. If that's the case, then asking for *free* advice might not be the right course of action. I would really hope that anyone running such a site is qualified enough not to have to cry for help whenever something bad happens to one of their client's sites. But that's just me. Like already noted, I believe most people will make an effort. But you confuse newbies by pinning so many things. They end up thinking either you are a control freak, or there are merely a bunch of favorites up there. That's like saying that trying to excuse people who get parking tickets because there are too many signs to read. Yes, it might be complicated, but no one's forcing you to park. Besides, the stickies (other than the guidelines) weren't there for years, and it didn't make any difference. It's not just a matter of confusion. Already told you that I completely agree. I found the advice in the advice thread to be sound and reasonable, even added a post to make up for my lapse in the first one. Or did I modify? Nope, probably should have, upon reading the recommendations. That's great... since any help that anyone receives on the forums is only limited by the initial amount of info/detail provided. Getting lost in semantics here. I guess it's good they are not rules though. In fact, what you said about frustration before is the reason I put these together to begin with -- so that other, perhaps less patient, members would not get fed up. And, of course, to get the bottom of things faster. Covered this territory. I have no disagreement about the recommendations. I merely wanted to offer a tip about how more people seeking help might read them in the first place. Maybe you could change the color of that one thread title? Great idea -- I'm all for making it stick out more than the rest, just have to figure out how SMF will allow me to do so. Tips are always appreciated and welcomed. I am sure from your role it gets tiring. I am a forum moderator also, forced to answer questions about site problems and suggestions. I don't think tiring is the right word, though I don't want to get stuck on semantics here. Like I said earlier, no one is forced to answer, just like no one is forced to post. Just trying to make things run a bit more smoothly, is all. Maybe you are missing the idea that I WANT the help found inside that pinned thread. What I don't want is needing to take a long time trying to figure things out during a moment of merely needing an answer. I had been rushing around that day trying to hire a programmer on a bid site, laboring to get information from the host, answering questions from frustrated members. Oh, I have a regular life too. I thought uppercase was sufficient, but perhaps I didn't go far enough... TBH, I just use the unread topics links, so I never see these threads anyway. Still, looking through a list of 7 things is far from "laborious"... but I digress. Having it #1 is always better. Definitely not my intent, just my ignorance. Always glad to lend a helping hand. -
Please use a where clause!
-
I'm not sure what you mean.... what's stored in the DB? NULL or ""? Besides, mysql has no control over how anything is displayed -- that's up to you in PHP/HTML.
-
Next time, you may want to consider posting a small code snippet that the rest of us might find helpful.
-
Yes, but them you're trying to get assign the value of the ticket using the resultset directly -- that won't work. Then use a UNIQUE index -- and then your INSERT will fail, and you can capture that error.
-
Why not PRIMARY KEY?
-
Table crashed. Can data from just part of a backup be fed into a new table?
fenway replied to randalusa's topic in MySQL Help
Maybe you don't realize it, but being new to a site and being slapped with as many pinned threads as y'all got here can make a person just decide not to bother looking at them. I highly recommend dropping the number down to ONE, then putting links in that one to the others. Since all of the threads have topic names, you really only need to read the one about posting -- not sure how that can be overwhelming. That's because humans are lazy -- and there's no such thing as a coding "emergency". Besides, it's not "extra" effort, it's the "minimum required" effort. We're all helping for free here, and the more info we get, the better the answer will be. Simple as that. They aren't rules -- no one is forcing you to comply. All we're saying is that if you don't bother adhering to them, it's quite possible your question will go unanswered forever. Or you'll be mislead with the wrong answer. It's your question, your topic, and therefore your choice. But as a long-time moderator, I can tell you from personal experience that at least 2/3 of the topics could have been resolved within hours had the appropriate information simply been provided up-front, not over the course of days and countless posts back-and-forth requested said info. Again, the stickies are there to help you -- if you want to ignore them, so be it. Just don't be shocked if someone tells you to consult them. Besides, with the exception of the posting guidelines, the rest are simply lists of resources. -
Speed has nothing to do with column type choice. What happens with an out-of-range value depends on your mysql version and your choice of sql mode. Storing IP addresses requires INT UNSIGNED. 10 digits ~ 10M; MEDIUMINT UNSIGNED goes up to ~16M, but I'd stick with INT UNSIGNED regardless. 0/1 can use a BIT field, though I'm always against storing just a binary flag, since that's NEVER sufficient. As for 50 (single-byte) characters, your choices are CHAR(50) or VARCHAR(50), which really depends on your data distribution.
-
Right, that's the part that doesn't make sense. EDIT: unless row actually means "column".
-
What kind of conditions? Why not include these in the DB query itself?
-
Firstly, mysql_query returns a result set. Secondly, if there's a match, you'll find the row -- otherwise, you won't -- no need to "loop".
-
[SOLVED] VIEW vs JOINs vs extra column in one table
fenway replied to davestewart's topic in MySQL Help
I wouldn't de-normalize until you start to see serious performance issues -- and there are all sorts of ways around that too without messing with the underlying tables (caching and such). -
Show sample table rows.
-
Just remember that paging that way will be VERY slow as soon as the offset and/or the result set get large.
-
I don't understand the question.
-
Though mysql does support column privileges.
-
Lose the keys? What does that means? Besides, that doesn't sound like a mysql issue at all.
-
I'm sorry, I don't follow.
-
If you're having layout problems, this is the wrong forum. Show us the INSERT/UPDATE query -- nothing more -- and we'll let you know.