Ben zor bir zaman benim komut dosyası var hata bulma yaşıyorum. Herkes bana o nokta yardımcı olabilir misiniz?
case "process_movie_order":
// handle POST
if ($_POST) {
//Drop "order" column and Re-ADD it to reset ID #'s
$droppedresult = mysql_query("ALTER TABLE videos DROP COLUMN order");
$addedresult = mysql_query("ALTER TABLE videos ADD order int NOT NULL");
$totalMovies = count($_POST['movie']);
// use $i to increment the order number
$i=$totalMovies;
// loop through post array in the order it was submitted
foreach ($_POST['movie'] as $video_id) {
// update the row
$query = sprintf("UPDATE videos SET order='%s' WHERE video_id='%s'",
mysql_real_escape_string($i),
mysql_real_escape_string($video_id));
$result = mysql_query($query);
if(!$result) {
echo mysql_error();
echo 'MySQL query failed. Please report this error to the author of this script.<br />
<br />
<a href="'.$script_location.'?action=show_landing_page">Back</a><br />';
break;
}
// decrease order number to make the next movie lower
$i--;
}
}
Eğer SQL sözdizimi bir hata var; line 1 video_id = 'video55'' yakınlarındaki' sipariş = '55 'kullanmak doğru sözdizimi için MySQL sunucu sürümü karşılık kılavuzunu kontrol
Teşekkürler!