genau Posted February 8, 2009 Report Share Posted February 8, 2009 Gribu izvadiit saanu menuci nemot no datubaazes nosaukumus, bet nesanaak paliidziet atrast kljuudu kods taads: <?php $dbhost="localhost"; $dbusername="root"; $dbpassword="Bri"; $dbname="bri"; $connect = mysql_connect($dbhost, $dbusername, $dbpassword); $db = mysql_select_db($dbname,$connect) or die ('Could not connect: ' . mysql_error()); ?> //konekcija <?php include("config.php"); $a = $_GET["id"]; $query = mysql_query ("SELECT `menu`.`menuID`, `menu`.`Name` FROM `menu` WHERE (`menu`.`mainbtnID` = $a) ORDER BY `menu`.`Name` ASC ",$connect) or die ('Could not connect: ' . mysql_error()); while($row = mysql_fetch_array($query)) { $b= $row['menu'.'menuID']; echo $row['menu'.'menuID'] ; echo ($b); $c=($b[2]*10 + $b[3]); // echo ($c); echo $row['menu'.'menuID']; echo ("</br>"); ... ... Link to comment Share on other sites More sharing options...
Val Posted February 8, 2009 Report Share Posted February 8, 2009 (edited) līdz kurai rindiņai darbojas, kā vajag? Edited February 8, 2009 by Val Link to comment Share on other sites More sharing options...
genau Posted February 8, 2009 Author Report Share Posted February 8, 2009 nu principaa datu baazei piekljuust, atlasa vajadziigo ierakstu daudzumu - while straadaa vajadziigo reizhu skaitu, bet netiek pieshkjirta vajadziigaa veertiiba mainiigajam $b... Link to comment Share on other sites More sharing options...
bubu Posted February 8, 2009 Report Share Posted February 8, 2009 Izdari: print_r($row); Un paskaties kādas atslēgas ir $row masīvā. Jo ļoti apšaubu, ka tajā ir "menumenuID" Link to comment Share on other sites More sharing options...
Recommended Posts