Ich habe zwei Tabelle temp_bid
und . Ich möchte Datensätze, die auf Projekte bieten. und dafür habe ich eine Abfrage mit INNER JOIN gemacht, aber Undefined Index error bekommen. Es funktioniert im MySQL-Editor.INNER JOIN: Hinweis: Undefinierter Index
Hier ist mein Code.
<?php
include 'conn.php';
session_start();
if ($_SESSION['EmailID'] == "") {
header("location:index.html");
}
$getTempBid = "SELECT * from temp_bid TB INNER JOIN post_project P ON P._id = TB.prj_id " +
" WHERE TB.bidBy = '" .$_SESSION['EmailID']."'";
$tempBidResult = mysqli_query($conn,$getTempBid);
while($fetchTempBid = mysqli_fetch_row($tempBidResult)) {
$tempBidId = $fetchTempBid['tempBidId'];
$tempBidPrjId = $fetchTempBid['prj_id'];
$tempBidPostBy = $fetchTempBid['postBy'];
$tempBidBy = $fetchTempBid['bidBy'];
$tempBidOn = new DateTime($fetchTempBid['bidOn']);
$tempBidAmount = $fetchTempBid['amount'];
$tempBidDays = $fetchTempBid['days'];
$tempBidProposalDetails = $fetchTempBid['proposalDetails'];
$tempBidStatus = $fetchTempBid['bidStatus'];
$prjId = $fetchTempBid['_id'];
$prjTitle = $fetchTempBid['projectTitle'];
$prjDescriptions = $fetchTempBid['projectDescriptions'];
$prjSkills = $fetchTempBid['projectRequiredSkill'];
$prjSkills1 = explode(",", $prjSkills);
$prjBudget = $fetchTempBid['projectBudget'];
$prjPostDate = new DateTime($fetchTempBid['projectCreatedOn']);
$prjStatus = $fetchTempBid['projectStatus'];
}
$records = mysqli_num_rows($tempBidResult);
?>
Output:
Notice: Undefined index: tempBidId in C:\wamp\www\Gopinath Infosystem\testpage.php on line 23
Notice: Undefined index: prj_id in C:\wamp\www\xxx\testpage.php on line 24
Notice: Undefined index: postBy in C:\wamp\www\xxx\testpage.php on line 25
Notice: Undefined index: bidBy in C:\wamp\www\xxx\testpage.php on line 26
Notice: Undefined index: bidOn in C:\wamp\www\xxx\testpage.php on line 27
Notice: Undefined index: amount in C:\wamp\www\xxx\testpage.php on line 28
Notice: Undefined index: days in C:\wamp\www\xxx\testpage.php on line 29
es bedeutet einfach, dass Abfrage keinen Datensatz zurückgeben. versuche, eine Abfrage in mysql direkt mit exakt demselben Wert von $ SESSION ['EmailID'] zu starten und zu überprüfen, ob irgendwelche Datensätze kommen oder nicht? –
@AlivetoDie, ich hatte die gleiche Abfrage in MySQL direkt mit dem exakt gleichen Wert von $ SESSION ['EmailID'] 'und Datensätze kommen. –
Sie haben die richtige Antwort unter –