Sep 21, 2012

PHP polymorphism

http://phpmaster.com/subtype-polymophism/


Sep 18, 2012

Wordpress to regular website

Many clients ask me to build their websites with wordpress. So, now i found an interesting article about that:

"I get that for most of us entrepreneurs, especially when we're just getting started, we're bootstrapping and funds are tight.  That's what you need to jump in and use WordPress to build your website.  So, here's how to make a "regular" (non-blog) website using WordPress.  To see a larger version of any image below, just click on it.
Over the next few days I'll be posting about WordPress and how to get the most out of it.  But back to setting up your site…
First, you'll need to install WordPress on your hosting space.  This is not as scary as it sounds – really, it's not!  Most website hosts will even install it for free for you if you open a support ticket and ask.  Here's a video showing how to install WordPress using Fantastico (will open in a new window so you don't lose this post)."

Read more...

Mysql Restore

This handy command line snippets allow us to import and export databases or tables with mysql built in function. Mysqldump command can be configured to export databases, or just a table.


//Export Database
mysqldump -uUsername -p Database > db_backup.sql
 
//Export Multiple databases
mysqldump -uUsername -p --databases db_name1 [db_name2 ...] > db_backup.sql
 
//Export All databases
mysqldump -uUsername -p --all-databases > db_backup.sql
 
//Export a table
mysqldump -uUsername -p Database Tablename > table_backup.sql
 
//Export multiple tables
mysqldump -uUsername -p Database Table1 [Table2 ...]  > tables_backup.sql



Restore database or tables from mysqldump file
mysql -u username --p database_name < dump.sql