Welcome Guest, Not a member yet? Register   Sign In
Help building blog
#11

[eluser]Seppo[/eluser]
About the active months, you can do something like this (in MySQL, not sure on other db server)
Code:
SELECT DISTINCT DATE_FORMAT(FROM_UNIXTIME(entries.date), '%m %y') as month_year FROM entries;

About the html tags, I think the proper thing to do is to strip all tags before limit the characters, and you only display the plain text.
#12

[eluser]awpti[/eluser]
[quote author="naez" date="1207998879"]Thanks very much, that should do the trick.

I just select everything I need because it's the way I learned. Plus I use innoDB for everything and I don't know how if using * would effect performance.[/quote]

Not much point in using InnoDB if you're working with a table that is 99.9% selects (as most blogs are). ISAM is (very very mildly) faster and SELECT * isn't much slower (noticably anyway) on Inno than it is with the ISAM table type.

Only real advantage Inno gives you is Transactions and row-level locking rather than full-table locking like ISAM does. Great if you have a massive table. Not terribly useful if it's small.

Had a customer the other day with a ~5M row table that was locking the DB for 3-5 minutes at a time due to his <very poor> insert and select statements. Flipped the table type to innodb and added a few indexes.. all good now.

Also, start studying up on the Falcon Engine since that'll be coming out within the next year or so with MySQL 6.0

Falcon engine support coordinate locking which is super-awesome.




Theme © iAndrew 2016 - Forum software by © MyBB