Posts

Showing posts from August, 2013

Magento 1.5.1.0 - How to check in the frontend if admin is logged in

In Magento 1.5.1.0, I've tried different approaches just to check in the frontend if the admin is logged in. There are lots of codes I found in the net but they didn't work. Well, the easiest approach is just this : Mage::getModel('admin/session')->isLoggedIn() I used that in the custom router I created. Now buy me some beer!

Ubuntu Terminal: mysql -u username -p database_name < database.sql does not import completely

If ever you have encountered the issue mentioned in the title of this post, I have an alternative for that. I experienced that when I imported a very large sql file which is about 2GB. What I did was I used the mysql command line client. I think you have an idea now how i did it. But here we go. In your terminal, type mysql -u <your_username> -p. Then type of course type the password when prompted. Then run use <database_name>; press enter. And then,  source sqlfile.sql; That should do the trick. Just wait for it to finish importing.