दूषित है I 000webhost.com का उपयोग कर रहा हूं और मैं वहां phpMyAdmin का उपयोग कर रहा हूं। मुझे यह त्रुटि mysql से मिल रही है जब मैं अपनी PHP स्क्रिप्ट को शीर्षक के रूप में चलाता हूं:mysql.proc की कॉलम गिनती गलत है। अपेक्षित 20, पाया गया 16. तालिका शायद
mysql.proc की कॉलम गिनती गलत है। अपेक्षित 20, पाया गया 16.
तालिका शायद दूषित हो गई है।
क्या इसके लिए कोई समाधान है? धन्यवाद।
संपादित: यहाँ मेरी कोड
<?php
$username="usrname";
$password="passwd";
$database="a1xxxxx_mydb";
$host="mysqlxx.000webhost.com";
mysql_connect($host,$username,$password);
@mysql_select_db($database) or die("Unable to select database");
if (isset($_GET["userLatitude"]) && isset($_GET["userLongitude"])) {
$userLatitude=$_GET['userLatitude'];
$userLongitude=$_GET['userLongitude'];
$result = mysql_query("SELECT locationName, (6371 * acos(cos(radians(floatval( $userLatitude))) * cos(radians(locationLatitude)) * cos(radians(locationLongitude) - radians(floatval($userLatitude))) + sin(radians(floatval($userLongitude))) * sin(radians(locationLatitude)))) AS distance
FROM Location HAVING distance < 2 ORDER BY distance LIMIT 0 ,20") or die(mysql_error());
echo $result;
// check for empty result
if (mysql_num_rows($result) > 0) {
// looping through all results
// products node
$response["Location"] = array();
while ($row = mysql_fetch_array($result)) {
// temp user array
$product = array();
$product["locationName"] = $row["locationName"];
$product["locationInfo"] = $row["locationInfo"];
$product["locationLatitude"] = $row["locationLatitude"];
$product["locationLongitude"] = $row["locationLongitude"];
$product["locationPic"] = $row["locationPic"];
$product["city"] = $row["city"];
// push single product into final response array
array_push($response["Location"], $product);
}
// success
$response["success"] = 1;
// echoing JSON response
echo json_encode($response);
} else {
// no products found
$response["success"] = 0;
$response["message"] = "No products found";
// echo no users JSON
echo json_encode($response);
}
}
else {
// required field is missing
$response["success"] = 0;
$response["message"] = "Required field(s) is missing";
// echoing JSON response
echo json_encode($response);
}
mysql_close();
?>
। क्या आप एक संग्रहीत प्रक्रिया चला रहे हैं? यूडीएफ? आप जिस कोड को चलाने की कोशिश कर रहे हैं उसे दिखाने के बारे में कैसे?हम अच्छे हैं, लेकिन हम मानसिक नहीं हैं और आपके दिमाग को नहीं पढ़ सकते हैं या अपनी स्क्रीन को दूरस्थ रूप से देख सकते हैं। –
ओह आप सही हैं, मैं जितनी जल्दी हो सके कोड डाल रहा हूं .मैं 000webhost.com से कनेक्ट नहीं हो सकता। मैं इसे पोस्ट करूंगा। धन्यवाद :) – user2086258
http://dba.stackexchange.com/questions/956/resolving-issue-with-mysql-proc-after-upgrading-mysql-from-5-0-to-5-1 –