Jump to content

nearenough1

New Members
  • Posts

    4
  • Joined

  • Last visited

nearenough1's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. as i have one website and its free for anyone to use it would not make sense to spend money on learning a thing i would only ever use once im afraid. i will certainly look into finding somewhere to learn about PDO with a budget of £0
  2. i followed the link "SQL tutorials" at the footer of the reply and i got to a very complex website on which i could not find the relevant page dealing with mysqli_query() sorry i did try. id like my free website to be back working as its a big help to a sport which is really struggling in the UK at present. ive hardly any knowledge of computer programming so its quite a struggle to get my head around all these new things flying about from all directions.
  3. thanks for the reply. would be nice if adding an i had solved all my problems, but hey ho lifes never that simple is it. so if the above requires 2 arguments how do i do that please? thanks
  4. a few months ago my free server updated its php to php8 and now nothing on my results website shows up when you click a link. http://trotdata.byethost32.com/ im assuming i need to update the php code for each serch page but ive no idea where to start and what to do. at the moment i have the following for the results search page which currently returns a blank page. { $Meetcode = $_GET['Meetcode']; } { $searchSQL = "SELECT RaceDate, RaceNumber, RaceName, RaceDist, Track, Placing, Sorter, Horseid, Trail, Draw, Driver, Dist, Time, Comment, Prize FROM RaceTable WHERE "; $types = array(); $types[] = $_GET['Meetcode']?"`Meetcode` LIKE '$Meetcode'":''; $types = array_filter($types, "removeEmpty"); if (count($types) < 1) $types[] = "`Meetcode` LIKE '$Meetcode'"; $andOr = isset($_GET['matchall'])?'AND':'OR'; $searchSQL .= implode(" {$andOr} ", $types) . " ORDER BY racedate, racenumber, Sorter, Placing ASC"; // order by title.order by title. $searchResult = mysqli_query($searchSQL) or trigger_error("There was an error.<br/>" . mysqli_error() . "<br />SQL Was: {$searchSQL}"); if (mysqli_num_rows($searchResult) < 1) { $error[] = "The search term provided {$searchTerms} yielded no results."; } else { $results = array(); // the result array echo '<table border="0" align=center width=80%>'; $last_race_number =''; while ($row = mysqli_fetch_assoc($searchResult)) { if($last_race_number != $row['RaceNumber']) { echo "<tr><th colspan='9'>". $row['RaceName'] ." - ". $row['RaceDist']." - ". $row['Track']." - ". $row['RaceDate'] ."</td></tr>"; } echo '<tr>'; echo "<th>".$row['Placing']."</td>"; echo "<td align=left><a href='horse.html.php?Horseid=".urlencode($row['Horseid'])."'>".$row['Horseid']."</a></td>"; echo "<td>".$row['Trail']."</td>"; echo "<td>".$row['Draw']."</td>"; echo "<td align=left>".$row['Driver']."</td>"; echo "<td>".$row['Dist']."</td>"; echo "<td>".$row['Time']."</td>"; echo "<td align=left>".$row['Comment']."</td>"; echo "<td>£".$row['Prize']."</td>"; echo '</tr>'; $last_race_number = $row['RaceNumber']; } echo '</table>'; } } ?> ************when i test the code i get an error for line= $searchResult = mysqli_query($searchSQL) or trigger_error("There was an error.<br/>" . mysqli_error() . "<br />SQL Was: {$searchSQL}"); and line= $error[] = "The search term provided {$searchTerms} yielded no results."; what do i need to do to ressurect my site please??
×
×
  • 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.