Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.
$sql = "UPDATE `plogger_pictures` SET `caption` = '".$basename."' WHERE `path` = '".addcslashes($row['path'], "'")."'";
$sql = "UPDATE `plogger_pictures` SET `caption` = '".$basename."' WHERE `path` = '".mysql_real_escape_string($row['path'])."'";
$sql = "UPDATE `plogger_pictures` SET `caption` = '".$basename."' WHERE `id` = ".$row['id'];
$sql = "UPDATE `plogger_pictures` SET `caption` = '".mysql_real_escape_string($basename)."' WHERE `id` = ".$row['id'];
<?php
include(dirname(__FILE__).'/gallery.php');
$query = "SELECT * FROM `plogger_pictures` WHERE 1";
$result = run_query($query);
while ($row = mysql_fetch_assoc($result)) {
$basename = basename($row['path']);
$basename = substr($basename, 0, strrpos($basename, '.'));
$basename = str_replace('_', ' ', $basename);
$basename = ucwords(strtolower($basename));
$sql = "UPDATE `plogger_pictures` SET `caption` = '".mysql_real_escape_string($basename)."' WHERE `id` = ".$row['id'];
$sql_result = run_query($sql);
if (!$sql_result) {
echo "\n".'<li>Error updating caption for '.basename($row['path']).'</li>';
} else {
echo "\n".'<li>Updated caption to <strong>'.$basename.'</strong></li>';
}
}
echo "\n".'<br />Done!';
?>
<?php
include(dirname(__FILE__).'/gallery.php');
$query = "SELECT * FROM `plogger_pictures` WHERE 1";
$result = run_query($query);
while ($row = mysql_fetch_assoc($result)) {
if (empty($row['caption'])) {
$basename = basename($row['path']);
$basename = substr($basename, 0, strrpos($basename, '.'));
$basename = str_replace('_', ' ', $basename);
$basename = ucwords(strtolower($basename));
$sql = "UPDATE `plogger_pictures` SET `caption` = '".mysql_real_escape_string($basename)."' WHERE `id` = ".$row['id'];
$sql_result = run_query($sql);
if (!$sql_result) {
echo "\n".'<li>Error updating caption for '.basename($row['path']).'</li>';
} else {
echo "\n".'<li>Updated caption to <strong>'.$basename.'</strong></li>';
}
}
}
echo "\n".'<br />Done!';
?>
1 to 17 of 17