QUery success, but blank results/variables

From: Date: Tue, 10 Sep 2002 03:41:23 +0000
Subject: QUery success, but blank results/variables
Groups: php.general 
Request: Send a blank email to php-general+get-115805@lists.php.net to get a copy of this message
Hello everyone..tryin to run this qry against a mysql db, but after it runs, it doesn't assign anything to the variables as it should. If i return all rows, and spit out each record in the result in an array, i have the same problem, but have 24 'blank' records instead of 1. Any ideas? Thanks for any input. I tried doing a print mysql_error(); after the query and the result, but it doesn't return anything. Column names, db name, and WHERE clause are all spelled correctly, and the $currenttaskid is populated (as 1)... $detailqry = "SELECT id, parentitemid, itemtypeid, itemstatusid, itemlevelid, shortdescription, createdby_memberid, assignedto_memberid, completedby_memberid, createddate, assigneddate, estcompletiondate, completeddate, projectid, lastuserid, lastdate FROM item WHERE id=$currenttaskid"; $result = mysql_query($detailqry) or die("Failed finding task details");
      $taskid = $result["id"];
      $taskparentitemid = $result["parentitemid"];
      $taskitemtypeid = $result["itemtypeid"];
      $taskitemstatusid = $result["itemstatusid"];
      $taskitemlevelid = $result["itemlevelid"];
      $taskshortdescription = $result["shortdescription"];
      $createdbyid = $result["createdby_memberid"];
      $assignedtoid = $result["assignedto_memberid"];
      $completedbyid = $result["completedby_memberid"];
      $taskcreateddate = $result["createddate"];
      $taskassigneddate = $result["assigneddate"];
      $taskestcompletiondate = $result["estcompletiondate"];
      $taskcompleteddate = $result["completeddate"];
      $taskprojectid = $result["projectid"];
      $tasklastuserid = $result["lastuserid"];
      $tasklastdate = $result["lastdate"];
mysql_free_result($result); -IrishBiotch irishprogramming@hotmail.com _________________________________________________________________ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com

« previous php.general (#115805) next »