error jump to row 0

Reply

Join Date: Mar 2008
Posts: 29
Reputation: stalk is an unknown quantity at this point 
Solved Threads: 0
stalk stalk is offline Offline
Light Poster

error jump to row 0

 
0
  #1
Mar 12th, 2008
hello, I have a problem : What is it?

Warning: Unable to jump to row 0 on MySQL result index 2 in c:\apache\htdocs\cd_shop\funkcie_s_databazou.php on line 899
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 66
Reputation: silviuks is an unknown quantity at this point 
Solved Threads: 11
silviuks silviuks is offline Offline
Junior Poster in Training

Re: error jump to row 0

 
0
  #2
Mar 12th, 2008
can you paste mooore lines of code?
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 29
Reputation: stalk is an unknown quantity at this point 
Solved Threads: 0
stalk stalk is offline Offline
Light Poster

Re: error jump to row 0

 
0
  #3
Mar 12th, 2008
this is code, which display basket of online shop. And I need give to var: $cd details of product which process function vyber_detaily_tovaru($EAN_kod); Thanks for your help


foreach ($kosik as $EAN_kod => $qty)
{
$cd = vyber_detaily_cd($EAN_kod);
$ciste = vyber_detaily_media($EAN_kod);
echo "<tr>";
if($obrazky ==true)
{
echo "<td align = left>";
if (file_exists("obrazky/albumy/".$EAN_kod.".gif"))
{
$size = GetImageSize("obrazky/albumy/".$EAN_kod.".gif");
if($size[0]>0 && $size[1]>0)
{
echo "<img src=\"obrazky/albumy/".$EAN_kod.".gif\" border=0 ";
echo "width = ". $size[0]/2 ." height = " .$size[1]/2 . ">";
}
}
else
echo "&nbsp;";
echo "</td>";
}
echo "<td align = left>";
echo "<a href = \"zobrazenie_cd.php?EAN_kod=".$EAN_kod."\">".$cd["album"]."</a> by ".$cd["interpret"];
echo "</td><td align = center>".number_format($cd["cena"], 2)." Sk";
echo "</td><td align = center>";

//ak povolime zmeny, pocet kusov danej polozky sa bude nachadzat v textboxe
if ($zmena == true)
echo "<input type = text name = \"$EAN_kod\" value = $qty size = 3>";
else
echo $qty;
echo "</td><td align = center>".number_format($cd["cena"]*$qty, 2)." Sk</td></tr>\n";
}

//zobrazenie riadku z celkovou cenou
echo "<tr>
<th colspan = ". (2+$obrazky) ." bgcolor=\"green\">&nbsp;</td>
<th align = center bgcolor=\"green\">$polozky</th>
<th align = center bgcolor=\"green\">".number_format($celkova_cena, 2)." Sk</th></tr>";

//zobrazenie tlacitka ulozit zmeny
if($zmena == true)
{
echo "<tr>
<td colspan = ". (2+$obrazky) .">&nbsp;</td>
<td align = center>
<input type = \"hidden\" name = \"uloz\" value = \"true\">
<input type = image src = \"obrazky/ulozzmeny.png\"
border = 0 alt = \"Uložit zmeny\">
</td>
<td>&nbsp;</td>
</tr>";
}
echo "</form></table>";
}





this is code of function: vyber_detaily_tovaru($EAN_kod);



function vyber_detaily_tovaru($EAN_kod)
//funkcia ziskavajuca z databazy detaily konkretneho tovaru podla EAN kodu
{
//poziadavka pre databazu o konkretne detaily tovaru
if (!$EAN_kod || $EAN_kod=="")
return false;

$conn = db_connect();


$query="select * from albumy left join ciste_media on albumy.EAN_kod=ciste_media.EAN_kod where albumy.EAN_kod='$EAN_kod' and ciste_media.EAN_kod='$EAN_kod'";



// $query = "select * from ciste_media where EAN_kod='$EAN_kod'";
$result = @mysql_query($query);
if (!$result)
return false;
$result = @mysql_fetch_array($result);
return $result;
}
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 29
Reputation: stalk is an unknown quantity at this point 
Solved Threads: 0
stalk stalk is offline Offline
Light Poster

Re: error jump to row 0

 
0
  #4
Mar 12th, 2008
Is it possible to make this operation? $musica = vyber_detaily_cd($EAN_kod);
$ciste = vyber_detaily_media($EAN_kod);
$cd=$musica.$ciste;

How I join this variable? $ musica and $ ciste to one variable: $cd ? function vyber_detaily_cd and vyber_detaily_media($EAN_kod) select details of product which is in database and I need display this detail in shop basket when is used only one variable $cd. So I must join it to one variable $cd.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC