RE: Quarter question..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> $sql = "select quarter($qdate)" or die("not work #3");
change to
$sql = "select quarter($qdate) as my_quarter"; //Added an alias to
quarter($qdate). Easier to access that way...
And there's no need for an 'or die()' here. You're just assigning a variable
and most likely this will allways work!


> $yyy = mysql_query ($sql) or die("not work #4");
change to
$yyy = mysql_query ($sql) or die("not work #4: " . mysql_error());
//Standard MySQL trouble-shooting...


> printf("<td><a href=\"%s?id=%s&delete=yes\">Delete</a></td>", 
> $PHP_SELF, 
> $myrow["id"]);
> printf("<td><a 
> href=\"%s?id=%s&submit=yes\">Update</td><td>%s</td><td>  
> %s</td><td>  %s</td></a></tr>", 
> 	"update-inv.php", $myrow["id"], $myrow["name"], 
> $myrow["details"], $yyy);
and here you actually echo out the resource id instead of it's value...
change $yyy to $yyy["my_quarter"]

HTH
Joakim

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux