My Code book

Archive for January 2009

Php Mysql Question and Answers for Interview

Posted by: Purab on: January 22, 2009

What is the difference between PHP4 and PHP5?
PHP4 cannot support oops concepts and Zend engine 1 is used.
PHP5 supports oops concepts and Zend engine 2 is used.
Error supporting is increased in PHP5.
XML and SQLLite will is increased in PHP5.Can we use include(abc.PHP) two times in a PHP page makeit.PHP”?
Yes we can include that many times [...]

Tags: ,

Important mysql quries

Posted by: Purab on: January 8, 2009

Taking backup of all mysql databases
>mysqldump -uroot -p –all-databases >> all_database_dump.sql;
for single database
mysqldump -uroot -p public_wordpressmu wp_1_posts > one.sql
database import from sql file
mysql –verbose -uroot -p public_wordpressmu wp_1_posts < one.sql
Creating Trigger
create trigger
DROP TRIGGER wordpress.after_wp_1_post_update;
delimiter //
CREATE TRIGGER wordpressmu.after_wp_1_post_update
AFTER UPDATE ON wordpressmu.wp_1_posts
FOR EACH ROW
IF new.post_status = ‘publish’ THEN
INSERT INTO .article_posts (id,ref_id, title, status,
comments_on, created_at, updated_at) values (new.id,new.id,
new.post_title, [...]


Add This page

Bookmark and Share

Blog Stats

  • 13,796 hits

Purab’s Twittes