Posts Tagged ‘functions’

Wordpress extra stuff

This item was filled under [ Wordpress ]

Here are some very usefull informations for those who use Wordpress as CMS
Wordpress extra stuff

/%postname%/
Custom permalinks

<?php include(TEMPLATEPATH . ‘/x’) ?>
Inlude any file (replace “x” with filename)

<?php the_search_query(); ?>
Value for search form

<?php _e(‘Message’); ?>
prints out message

<?php wp_register(); ?>
Displays the registration link

<?php wp_loginout(); ?>
Displays the login/logout link (only for registered users)

<?php <!–next page–> ?>
Divides the content into [...]

Continue reading...

Tagged with: [ , , , , , ]

5 Useful MySQL Functions And Control Flows

This item was filled under [ MySQL ]

1: IF()
If statements have been a life saver on many occasions. They are invaluable for checking a value then returning another value different from the one stored in the table.
sql Code:

SELECT
IF(myColumn1 = 1, ‘Yes’, ‘No’) AS myIfColumn
FROM
myTable

Result: If myColumn1 equals 1 then Yes else No.
2: ELT()
Similar to an if else statement. The ELT takes the [...]

Continue reading...

Tagged with: [ , , , ]
Update me when site is updated