Jump to content

Studio4web

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Contact Methods

  • AIM
    studio4web
  • Website URL
    http://www.studio4web.com
  • ICQ
    25084325

Profile Information

  • Gender
    Male
  • Location
    Internet

Studio4web's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thank you very much, your first solution working just like I need. Miron
  2. Hello to all. I'm a new user here. I have one problem with returninh data from query. I need show data in middle and at end of page but I don't know how to do that. Here is mysql query: [code] <?php $query_ponuda_dana = "SELECT nekretnine.id, nekretnine.mjesto, nekretnine.opis FROM nekretnine LEFT JOIN slike ON nekretnine.id = slike.id_nekretnine WHERE nekretnine.ponuda = 2 AND nekretnine.aktivan = 1 AND slike.glavna = 1 ORDER BY RAND() LIMIT 13"; $ponuda_dana = mysql_query($query_ponuda_dana) or die(mysql_error()); $row_ponuda_dana = mysql_fetch_assoc($ponuda_dana); ?> [/code] Now I got 13 records, and I need show first 3 in the middle and other 10 at the end of the page. I'm using this code to show query results: [code] <?php do { echo '<div align="center"><b>'.$row_ponuda_dana['mjesto'].'</b> - '.$row_ponuda_dana['opis'].'</div><br><br>'; } while ($row_ponuda_dana = mysql_fetch_assoc($ponuda_dana)); ?> [/code] This code return me all 13 records, but I need only 3 and in next run other 10. I can't use two queries because I'm using "ORDER BY RAND()", and there couldn't be repeating the same rows. Best regards, Miron
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.