Skip to content

Study PHP Skills, Share PHP Code

  • Home
  • About

How to using PHP to delete wordpress coments?

August 3, 2011August 3, 2011 abiao

Sometimes there are thousands wordpresss comments there, it is too difficult to delete them. Any method to delete them one time without login phpmyadmin? The answer is yes, the follow code can help you. include(‘wp-config.php’); mysql_query(“truncate table wp_comments;”); Copy the… Read moreHow to using PHP to delete wordpress coments?

MySQL, Php Code

Get WordPress Current Category URL and Link

July 3, 2011 abiao

<?php global $wp_query; $cat_obj = $wp_query->get_queried_object(); // Get the ID of a given category $category_id = get_cat_ID( ‘Category Name’ ); // Get the URL of this category $category_link = get_category_link( $category_id ); ?> <!– Print a link to this category… Read moreGet WordPress Current Category URL and Link

WordPress

Mass Delete trash post from WordPress

June 11, 2011June 11, 2011 abiao

Q:I want to mass delete my trash with 2000+ Posts in it. Is there a mysql command to do so? A: Please backup before running the query, i’ll not take responsibility if something goes wrong as a result.. DELETE p… Read moreMass Delete trash post from WordPress

MySQL, WordPress

How to change wordpress post author?

June 3, 2011 abiao

Here is the perfect steps to change wordpress post author: 1) Login into wordpress admin area. 2) Click on Edit in the Posts section. 3) Select the posts for which you need to edit the author details. 4) From the… Read moreHow to change wordpress post author?

WordPress

Only show for en Language

May 27, 2011May 27, 2011 abiao

Now more and more adsense accounts are banned due to useless trafice, especially non-English speaking countries trafic, we can add the following code to test our visiters Computer language: $_SERVER[‘HTTP_ACCEPT_LANGUAGE’] <?php $a = $_SERVER[‘HTTP_ACCEPT_LANGUAGE’]; echo $a; ?> We can get… Read moreOnly show for en Language

WordPress

Zen Cart Install – #1064 – You have an error in your SQL syntax

April 18, 2011 abiao

After install zen cart v1.3.9h, the front page show:   #1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘TYPE=MyISAM’ at line… Read moreZen Cart Install – #1064 – You have an error in your SQL syntax

MySQL

Using PHP to Export Mysql Data to Excel

March 30, 2011March 30, 2011 abiao

  <?php  $DB_Server = “localhost”;    $DB_Username = “put your user name here”;    $DB_Password = “put your password here”;    $DB_DBName = “put your database name here”;    $DB_TBLName = “put your table name here”;       $savename = date(“YmjHis”);  // excel file name… Read moreUsing PHP to Export Mysql Data to Excel

MySQL, Php Code

Change Hostgator MySQL Password

March 13, 2011 abiao

Sometimes we want to change hostgator mysql database user password, or we have to change when we forgot the password. How to do? Very simple infact, first delete the user name of the mysql and remake it, but make sure… Read moreChange Hostgator MySQL Password

MySQL, Vbulletin, WordPress

Mass Delete Comments from WordPress

February 25, 2011 abiao

Pending links, Spam links, or Trash links with a WordPress powered blog can grow really quickly and most is spam. Word Press allows you to remove such comments but only 20 at a time. What if you have thousands pending… Read moreMass Delete Comments from WordPress

Php Code, WordPress

explode and foreach to show strings or ASCII

January 17, 2011 abiao

//transfer ASCII to string $string = “78b101b116b87b105b110b100”; $tags = explode(‘b’, $string);  foreach($tags as $key) { echo chr($key);  } //transfer string toASCII echo “<br><br>”; $string = “Tiger Young”; foreach($tags as $key) { echo ord($key).”b”;  } echo “<br><br>”;

Php Functions, Php Skills

Posts navigation

Older posts
Newer posts




Categories

  • Apache
  • Drupal
  • Javascript
  • Magento
  • MySQL
  • Nginx
  • Other
  • Php Code
  • Php Functions
  • Php Learning
  • PHP Link Directory
  • Php Skills
  • Php Study
  • Vbulletin
  • Web Hosting
  • WordPress
  • X-Cart
  • Zen Cart

Eyeglasses

  • buy eyeglasses
  • Medical Companies
  • prescription glasses
  • prescription glasses

PHP

  • PHP Friend
  • PHP Know
  • Web Design

Web Hosting

  • Astrill VPN
  • Hostgator Hosting

Recent Posts

  • How to Change Zen-Cart Homepage Big Banner and The Text Under It?
  • How to Change “Congratulations! You have successfully installed your Zen Cart® E-Commerce Solution.”?
  • Problems with the CURL extension While Installing Zen-cart Under Nginx
  • php7.2: the each() function is deprecated
  • Sublime Text 3 – How Can We Add Our PHP Tags?
«123456789101112131415...»Last »

RSS Cheap Prescription Glasses Online

  • How to Shop for New Glasses Online
  • What to Look for in Rimless Eyeglasses
  • Tips to Help You Buy Cheap Glasses Online

RSS Cheap Prescription Eyeglasses Online

  • Save Money by Buying Discount Glasses
  • How to Buy the Correct Pair of Prescription Eyeglasses
  • Read This before Buying New Eyeglasses Online
© 2018, www.kingphp.com
Go to top