mysqli::prepare Fails Using ALTER TABLE In A Statement With Parameter Markers


Part of a project I’m working on requires re-setting a MySQL table by deleting most – but not all – rows. In PHP I’m using mysqli::prepare to prepare the MySQL statements.

$id = 5;
$query = $conn->prepare("DELETE FROM table WHERE id>?");



The MySQL statement includes a parameter marker – denoted by ? – which is then substituted for the value of the $id variable using mysqli::bind_param.


inFocus WP Theme: Customising WP-PostViews and Efficient Related Posts Plugins


Since switching to WordPress I’ve been using the WP-PostViews and Efficient Related Posts plugins. Although the inFocus theme I use now comes with its own popular posts and related posts widgets I much prefer the functionality of the aforementioned plugins.

For example, WP-PostViews displays popular posts based on post views whereas the inFocus version uses the number of comments to determine a post’s popularity. And while there appears to be little if any difference in how Efficient Related Posts and the inFocus version determine related posts, the latter does so on-the-fly whereas the former pre-determines them, thus reducing the load on the server.


WebTreats inFocus WordPress Theme: Customising the Display of Post Excerpts


Since switching my blog from Blogger to WordPress I’ve been struggling with a new design. I’m pretty savvy with the coding, but if it’s one thing I’m not it’s a designer. Reluctant though I was to use a pre-built theme template I came across the one I’m using now and couldn’t resist. It’s simple yet elegant and in my opinion far superior to anything I’ve seen both in design and functionality.

Of course a template can’t cater for everyone’s needs and I’ve amended the code a bit to suit mine. One particular change I made was the way in which post excerpts are displayed. The theme uses the the_excerpt() function which either uses an explicit excerpt or the first 55 words of the post if one is not provided. I much prefer using WordPress’s <!––more––> quicktag in my posts in conjunction with the the_content(‘Read More’) function.


Installing PEAR Mail Package on MAMP and XAMPP


If you want your visitors to be able to send you an email from your site there are several options including mailto, sendmail or Postfix. There are also numerous sites offering contact forms for free. For a while I was using the excellent swiftmailer which performed perfectly on both my local and remote servers for a while, but subsequently ceased working on my remote server (presumably because of some configuration change by my hosting provider which I never did get to the bottom of).


Recent Comments

Recent Posts