Showing entries 101 to 104
« 10 Newer Entries
Displaying posts with tag: Geek (reset)
How to get your question answered on irc by example

n0other: Hello, I have a field publish_to, I want to select only those entries, where publish_to is not older than today, publish_to contains for example ‘2005-05-30′, I do: SELECT * FROM table WHERE (publish_to - “‘.date(’Y-m-d’) .’”) > 0; (php date function), but that doesnt work, how should I implement this, I cannot change date structure

Notice the detailed question with example. This shows people exactly what the problem is and that you have taken the time to try to solve it yourself.

firewire: so you want where it’s today and newer?
firewire: where publish_to >= curdate()

A quick response prior to testing

n0other: oh :}

Now after a quick test a final response letting everyone know that the problem was solved

n0other: works perfectly, thanks again
firewire:

It’s little times like these that make helping people on irc so much fun.

Root, mysql, root - A simple explanation of users.

There seems to be a lot of confusion in the newbie crowd about the difference between MySQL and OS users. It works like this. Your operating system supports users. That’s who you log in as when prompted. When logged in you can start processes or programs. If I log into my linux box as user eric anything started by me is said to be running as user eric. There is a super user known as root that has total control over the system. It’s not a good idea to run processes as root because they have the power to change anything in the system both bad and good. When installing MySQL the install guide says to create a user known as ‘mysql’. This is a new user in the operating system just like user ‘eric’. One of the things root can do is start processes as other users. Mysqld will complain if you start it as root without telling it to change into another user after executing. This can be done with –user= on the command line or user=mysql in my.cnf …

[Read more]
When MySQL Will Order Data.

This is cut and paste from an email I’m sending to the general mailing list. I’m putting this here so people can add comments. If any of this is wrong or you can think of a situation I didn’t. Add a nice comment

Here, off the top of my head are situations in mysql where you can trust that the data is ordered in some fasion.
1. Using an order by clause on a query.
2. Using a group by the data will come out in ascending order of the column that was grouped on.
3. alter table order by has been performed and the table hasn’t been modified .
4. select key from t; that uses the ‘Using Index’ in explain will return in the order of the key.

Use order by anyway just to be safe.

Naming Conventions In MySQL Revised.

I decided to repost the rules with Rule 3 removed. After review and discussion with a few people I decided that not naming tables plural couldn’t be a rule since there are times when it’s ok to name tables plural. I downloaded MySQL 5.0 Alpha to check out information_schema views. After a few minutes of [...]

Showing entries 101 to 104
« 10 Newer Entries