genau Posted February 8, 2009 Report 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>"); ... ...
Val Posted February 8, 2009 Report Posted February 8, 2009 (edited) līdz kurai rindiņai darbojas, kā vajag? Edited February 8, 2009 by Val
genau Posted February 8, 2009 Author Report 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...
bubu Posted February 8, 2009 Report 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"
Recommended Posts