October 14th, 2011 by
admin
Use SQL BETWEEN and AND to define a range of data between two values.
Example:
DELETE FROM `database_name`.`database_table` WHERE `database_table`.`TableRow` BETWEEN value1 AND value2
The two values can be numbers, dates or text.
Posted in Coding |
No Comments »
September 22nd, 2011 by
admin
Use the following code to restrict a piece of sidebar content to the homepage (so that it does not appear sitewide) in Wordpress:
In sidebar.php, add the following:
<?php if (is_home())
{
some PHP code
}
?>
That’s it!
Posted in Coding |
No Comments »
September 22nd, 2011 by
admin
Use {php} {/php} instead of <?php ?>
i.e.,
replace <?php with {php}
and
?> with {/php}
Example:
{php}
echo “This is php code included in .tpl<br />”;
{/php}
Posted in Coding, Web Design |
No Comments »