Alphabetic Pagination – Alphabetical Pagination stopped working since latest update.

I informed the author of WordPress plugin Alphabetic Pagination that it stopped working since version 1.0.2 update. I had pagination linked to the div in my site having ID #pagination, it was working perfectly. But after the last update of WordPress plugin Alphabetic Pagination stopped working. I asked the developer that how will this work again? And i provided the link of website, http://www.mediadigest.be/mediaterminologie/.

Developer replied that he is trying to find the issue related to WordPress website. He requested me to check my WordPress website settings, are correct? May be after updating the wordpress plugin Alphabetic pagination the website settings were reset.

I thanked him for the quick response. I told him that I don’t know what settings or DOM insertion point I have to choose, the alphabetical lists of post were not showing.

Developer replied, he’ll check the problem and would update in a few hours. He told pagination was displaying on every page even on posts in last version of plugin Alphabetic pagination. But now its restricted to only categories and taxonomies etc. Then he released another version to display it on other pages too.

Developer shared with me that initially other users didn’t want pagination on every page because they often don’t have lists except in categories.

I appreciated his efforts and updated him that I was using pagination in archive.php template. I wish him best of luck.

Alphabetic Pagination – Hebrew WordPress

I installed WordPress Plugin Alphabetic Pagination on my WordPress website with Hebrew language configuration. It messed up the dashboard. When I contacted the developer of the Plugin Alphabetic pagination; he replied that he will look into it and update the code. He asked me for the screenshot or a link to my RTL layout. He also asked if it’s the same website that was linked through my name, then it’s fine. But I couldn’t reply.
After some time he reminded me for the disturbed layout screenshot related the website so that he would be able to check the problem in details. But as it was resolved so couldn’t ping him again.

MySQL CONCATE_WS() Function

CONCATE_WS()

This function was used to join two or more string with separator to make a single string.
SELECT CONCAT_WS(‘,’, id, country_code, country_name)
FROM apps_countries
where country_name =’Pakistan’

Description

In the above example, was used as a separator and it join the id, country_name and country _code and make a single string.

Output

CONCAT_WS(‘,’,id,country_code,country_name)
167,PK,Pakistan

MySQL REGEXP Functions

REGEXP

The regular expression was used to match a string expression against a pattern. The pattern is used as an argument. If expression or pattern is null then, the function return null.
SELECT * FROM apps_countries WHERE country_name REGEXP’^A’;

Description

In the above example the regular expression matches only string that start with A.

Output

The output of the above program will be:
id  country_code   country_name
1    AF                               Afghanistan
2    AL                              Albania
3    DZ                             Algeria
4    DS                             American Samoa
5     AD                           Andorra

Example#2

SELECT * FROM apps_countries WHERE country_name REGEXP ‘na’;

Description

In the above example the query will find all name which contains ‘na’ in the string.

Output

id   country_code   country_name
10   AR                        Argentina
27   BA                        Bosnia and Herzegovina
28    BW                       Botswana
34    BF                         Burkina Faso
38    CA                         Canada
44    CN                         China
68     FK                          Falkland Islands (Malvinas)
74     GF                          French Guiana
81     GH                           Ghana
86     GD                           Grenada
92     GY                            Guyana
94     HM                           Heard and Mc Donald Islands
145    MC                           Monaco

Example#3

SELECT * FROM apps_countries WHERE country_name REGEXP ‘^[aeiou]’

Description

In the above example the query will show only string that that’s stars from vowel words.

Output

id   country_code   country_name
1     AF                      Afghanistan
2    AL                      Albania
3    DZ                      Algeria
4    DS                      American Samoa
5    AD                      Andorra
6   AO                       Angola
7   AI                        Anguilla
8   AQ                      Antarctica
9   AG                       Antigua and Barbuda
10  AR                      Argentina
11  AM                      Armenia
12  AW                     Aruba
13  AU                      Australia
14  AT                      Austria
15  AZ                      Azerbaijan
60  TP                      East Timor
61  EC                       Ecuador
62  EG                      Egypt
63  SV                      El Salvador
64  GQ                       Equatorial Guinea

MySQL MATCH() Functions

MATCH()

SELECT * FROM apps_countries
WHERE MATCH(country_code, country_name) AGAINST(‘Bangladesh’ IN BOOLEAN MODE)

Description

In this function we can search a value using match() and against() in Boolean mode. It can match the column from our table against the value which can we given.

Output

The output of the above program will be:
id   country_code   country_name
18     BD                     Bangladesh

Example#2

SELECT country_code FROM apps_countries
WHERE MATCH(country_code, country_name) AGAINST(‘pakistan’ IN BOOLEAN MODE)

Description

In the above example the query will search the country code against the country name.

Output

The output of the above example will be:
country_code
PK

MySQL LCASE() & UCASE() Functions

LCASE()

The LCASE() convert the character of string into lowercase.

$sql = “SELECT country_code, LCASE(\’BAHRAIN\’)\n”
. ” FROM `apps_countries`\n”
.”where country_name=\’Bahrain\'”;

Description

The above example converts the BAHRAIN into lower character.

Output

The output of the above program will be:
country_code     LCASE(‘BAHRAIN’)
BH                               bahrain

UCASE()

The UCASE() convert the character of string into uppercase.

$sql = “SELECT UCASE(country_name)\n”
. “FROM apps_countries”;

Description

The above example converts the BAHRAIN into lower character.

Output

UCASE(country_name)

AFGHANISTAN

ALBANIA

ALGERIA

AMERICAN SAMOA

ANDORRA

ANGOLA

ANGUILLA

ANTARCTICA

ANTIGUA AND BARBUDA

ARGENTINA

ARMENIA

ARUBA

AUSTRALIA

AUSTRIA

AZERBAIJAN

BAHAMAS

BAHRAIN

BANGLADESH

BARBADOS

BELARUS

BELGIUM

BELIZE

BENIN

BERMUDA

BHUTAN

BOLIVIA

MySQL MD5() Functions

MD5()

MySQL MD5() Calculates an MD5 128-bit checksum for a string. The value is returned as a binary string of 32 hex digits, or NULL if the argument was NULL. The example of MD5() function are given below:
$sql = “SELECT MD5(‘AZAM’)”;

Description

The above example returns the string of 32 hex digit. If we give the argument NULL then it give the output NULL.

Output

The output of the above function will be:
MD5(‘AZAM’)
f30f2b83d482145c20dd590110d7ad15

MySQL Date Functions

1. Date()

$sql = “SELECT DATE(from_date) FROM salaries”;

Description

The DATE() function extracts the date part of a date.

Output

Output of the above example will be:
DATE(from_date)
2016-10-03
2016-10-03
2016-11-02

2. DATE_ADD()

$sql = “SELECT  DATE_ADD(FROM_date,INTERVAL 30 DAY) FROM salaries”;

Description

The DATE_ADD() function adds a specified time interval to a date.

Output

Output of the above example will be:
DATE_ADD(FROM_date,INTERVAL 30 DAY)
2016-11-02
2016-11-02
2016-12-02

MySQL String Function

CONCAT()

$sql = ” SELECT  CONCAT(country_code,\’–> \’,country_name)\n”
. “FROM apps_countries”;

Description

MySQL CONCAT function is used to concatenate two strings to form a single string. In this example it can concat the country code and country name and give the result in single string.

Output

The output of the above example will be like this:
AF–> Afghanistan
AL–> Albania
DZ–> Algeria
DS–> American Samoa
AD–> Andorra
AO–> Angola
AI–> Anguilla
AQ–> Antarctica
AG–> Antigua and Barbuda
AR–> Argentina
AM–> Armenia
AW–> Aruba
AU–> Australia
AT–> Austria
AZ–> Azerbaijan
BS–> Bahamas
BH–> Bahrain
BD–> Bangladesh
BB–> Barbados
BY–> Belarus
BE–> Belgium
BZ–> Belize
BJ–> Benin
BM–> Bermuda