Jump to content
php.lv forumi

Otrie desmit


Snukzz

Recommended Posts

Hmm.. kaads var pateikt luudzu priekshaa, kaa lai pasaka MySQL ar PHP paliidziibu ka man no konkreetaas tabulas vajag otros 10 ierakstus no konkreetas tabulas?  :blink:

23418[/snapback]

 

luudzu :)

$no=10;

$lidz=20;

 

$query="SELECT * FROM tabula WHERE nosacijums LIMIT $no, $liidz";

 

:P

Link to comment
Share on other sites

Klau, kaapeec MySQL saka viss ok, bet PHP saka pee...

 

<TABLE cellpadding=0 cellspacing=0 width="140" align="center">
<tr><td align="center"><img src="Index_img/pes.jpg"></td></tr>
<?php

$resurs=mysql_query('SELECT id, texc FROM buy ORDER by id DESC LIMIT 0, 5');
while($rinda=mysql_fetch_row($resurs)){
?>
<TR><TD><? $rinda[1] ?></TD></TR>
 <TR><TD><HR size=1 color=#333333></TD></TR>
<?
}
?>
</TABLE>

 

Izvadaas tikai bildziite! :huh: ...ar eerroriem ar neblauj!

Link to comment
Share on other sites

Jēzus Marija!! Dati tak jaizvada

<?=$rinda[1] ?>

vai

<? echo $rinda[1] ?>

vai

<? print $rinda[1] ?>

23450[/snapback]

Meeginaaju - nepaliidz! Iisteniibaa man bija rakstiic <?=$rinda[1] ?> bet"=" kaut kur pazuda kameer liic shejienei atstiepu!

Link to comment
Share on other sites

Nu tip man i shitaa:

<TABLE cellpadding=0 cellspacing=0 width="140" align="center">
<tr><td align="center"><img src="Index_img/pes.jpg"></td></tr>
<?php

$resurs=mysql_query('SELECT id, texc FROM buy ORDER by id DESC LIMIT 0, 5');
while($rinda=mysql_fetch_row($resurs)){
?>
 <TR><TD><?=$rinda[1] ?></TD></TR>
 <TR><TD><HR size=1 color=#333333></TD></TR>
<?
}
?>
</TABLE>

Bet browserii no shitaa atnaak tikai:

<TABLE cellpadding=0 cellspacing=0 width="140" align="center">
<tr><td align="center"><img src="Index_img/pes.jpg"></td></tr>
</TABLE>

:huh:

Link to comment
Share on other sites

×
×
  • Create New...