Month: November 2014

  • install new cpanel centos vm xen server from local repos

    first this is the iso always get lattest from this url ok lets start log in to the host server ssh [php] cd / mkdir /isolib wget xe sr-create name-label=isolib type=iso device-config:legacy_mode=true device-config:location=/isolib content-type=iso [/php] finished then go create virtual vm and install centos if any question comment me

  • MySQL Pivot dynamic table columns

    [php]SET @sql = NULL; SELECT GROUP_CONCAT(DISTINCT CONCAT( ‘MAX(IF(pa.meta_name = ”’, meta_name, ”’, "pa.meta_value", NULL)) AS ‘, meta_name ) ) INTO @sql FROM post_meta; SET @sql = CONCAT(‘SELECT , , p.type, ‘, @sql, ‘ FROM post p LEFT JOIN post_meta AS pa ON = pa.post_id GROUP BY’); PREPARE stmt FROM @sql; EXECUTE […]

  • Delete Orphaned Post Meta Data in WordPress

    before you go with this please backup your date i am not responsible about your errors 🙂 enjoy [php] DELETE pm FROM wp_postmeta pm LEFT JOIN wp_posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL [/php]