mysql连接失败,没有错误,不明白为什么

时间:2013-03-08 15:30:33

标签: php mysql phpmyadmin

我有一张桌子,我双重检查了所有的名字和变量 但它似乎没有获取数组....

代码:

mysql_connect("localhost", "root", "")  or die(mysql_error()); 

//Selecting Database
mysql_select_db("solarsell_wizard")     or die(mysql_error());
//Calculate VanafPrijs START
$solarsell_calculation_vanafprijs      = mysql_query("SELECT * FROM solarsell_calculation_vanafprijs WHERE wPiekStart >= $Wattpiek_Rendement_Hard AND wPiekEnd <= $Wattpiek_Rendement_Hard  ") or die ( mysql_error() );
$resultt                               = mysql_fetch_array($solarsell_calculation_vanafprijs) or die (mysql_error());

$startupCost           = $resultt['startupCost'];
echo $startupCost;
$wPiekSolarInverter    = $resultt['wPiekSolarInverter'];
$wPiekMountingMat      = $resultt['wPiekMountingMat']; 
$wPiekMounting         = $resultt['wPiekMounting'];
$wPiekInstallation     = $resultt['wPiekInstallation'];
$wPiekTransport        = $resultt['wPiekTransport'];
$wPiekMisc             = $resultt['wPiekMisc'];
$margin                = $resultt['margin'];

如果我删除or die而不是它会加载,但不会显示回显... 我已经尝试了这个mysql_fetch_array($solarsell_calculation_vanafprijs, MYSQLI_BOTH) or die (mysql_error());

但它根本没用。

0 个答案:

没有答案