Tag

PHP

P

mysqli::prepare Fails Using ALTER TABLE in a Statement With Parameter Markers

m

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.

(more…)

Installing PEAR Mail Package on MAMP and XAMPP

I

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. 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.

(more…)

Recent Comments

Recent Posts