ciao a tutti. ho un problema con una ricerca nel database che avviene tramite delle funzioni..solo che sono abbastanza lunghe
provo a postare comuqnue una parte:
file header.php
consulta.phpcodice:<?php $admin="admin"; $password="password"; $limit = 12 ; $offset= $_GET['offset']; $contract= $_GET['fcontract']; $zone= $_GET['zone']; $type= $_GET['type']; function nav ($offset = 0,$this_script="") { global $limit; global $PHP_SELF; global $zone; global $type; if (empty($this_script)) { $this_script = $PHP_SELF; } if (empty($offset)) { $offset= 0; } $result = safe_query("select count(*) from buy " //."where public='yes'" ); list($total_rows) = mysql_fetch_array($result); if ($offset > 0) {print etcc...etc... } function select_entries ($offset = 0) { global $limit; global $zone; global $type; if (empty($offset)) { $offset = 0; } $query = "select * " ."from buy " //."where public='yes'" ."limit $offset, $limit "; $result = safe_query($query); return $result; }
nella barra dell'indirizzo vedo che i dati vengono inviati per la ricerca...vedo anche che vengono contati quante righe vengono trovate da un altra funzione....ma non mi stampa a video la ricerca.codice:$result= select_entrieslimit ($offset); //vedi header.php per cambiare i limiti o le condizioni di ricerca if (!empty($result)){ while ($row = mysql_fetch_array($result)) { parete di programma....etcc...
riuscireste a darmi un aiutino?
grazie.

Rispondi quotando