MySQL

Problem with mysql_query quoting of parameter values

I had some code which wasn't working:

mysql_query("UPDATE pracs SET name='{$name}', email='{$email}', webaddr='{$webaddr}', phone='{$phone}', level='{$level}', lineages='{$lineages}', description='{$desc}', password='{$password}' WHERE id={$id}");

In debugging the code I found that the correct values were reaching this statement, but the database wasn't being updated with the new values. Huh?

Well, the official documentation at http://www.php.net/manual/en/function.mysql-query.php says


// Formulate Query
// This is the best way to perform a SQL query

phpMyBackupPro: No simpler backup for MySQL

phpMyBackupPro is a utility which supposedly makes it easier to backup a MySQL database. The featureset includes

  • backup of one or several databases with or without data, table structure, ...
  • three types of compression (no compression, gzip or zip)
  • scheduled backups (by a small PHP script which must be included in an existing PHP script)
  • interface for managment of the backups (viewing, restoring, downloading, deleting)
  • backup directly onto FTP server and sending of backups by email
Syndicate content