Im trying to resurrect an old website that tracks radio contacts.
Ive been sent a website template from a friend, who uses old php and mysql.
Im slowly converting it to work in XAMPP, and to my surprise I am actually doing quite well.
However one page is giving me some grief.
If I comment out this section, the page loads, but obviously there is no data in the tables.
If I uncomment this section, i get HTTP500, the server can't process this request.
Any pointers as what could be wrong ?
- Code: Select all
<?php
$resultF = mysqli_query()(SELECT "txcallsign, name, section, txserial, count(distinct dxccdesc) as score, sum(cw) as tcw, sum(voice) as tvoice, sum(data) as tdata, sum(internet) as tinternet FROM dxqsos2023 join callsignshny where txcallsign = callsign AND section = 'Foundation' group by txcallsign order by count(distinct dxccdesc) desc") or die(mysqli_error());
$numF=mysqli_num_rows($resultF);
$resultI = mysqli_query(SELECT "txcallsign, name, section, txserial, count(distinct dxccdesc) as score, sum(cw) as tcw, sum(voice) as tvoice, sum(data) as tdata, sum(internet) as tinternet FROM dxqsos2023 join callsignshny where txcallsign = callsign AND section = 'Intermediate' group by txcallsign order by count(distinct dxccdesc) desc") or die(mysqli_error());
$numI = mysqli_num_rows($resultI);
$resultA = mysqli_query(SELECT "txcallsign, name, section, txserial, count(distinct dxccdesc) as score, sum(cw) as tcw, sum(voice) as tvoice, sum(data) as tdata, sum(internet) as tinternet FROM dxqsos2023 join callsignshny where txcallsign = callsign AND section = 'Advanced' group by txcallsign order by count(distinct dxccdesc) desc") or die(mysqli_error());
$numA = mysqli_num_rows($resultA);
$resultS = mysqli_query(ELECT "txcallsign, name, section, txserial, count(distinct dxccdesc) as score, sum(cw) as tcw, sum(voice) as tvoice, sum(data) as tdata, sum(internet) as tinternet FROM dxqsos2023 join callsignshny where txcallsign = callsign AND section = 'SWL' group by txcallsign order by count(distinct dxccdesc) desc") or die(mysqli_error());
$numS = mysqli_num_rows($resultS);
$totvoice = mysqli_query(SELECT "count(ID) as totvoice FROM dxqsos2023 where mode = 'Voice'");
$totdata = mysqli_query(SELECT "count(ID) as totdata FROM dxqsos2023 where mode = 'Data'");
$totcw = mysqli_query(SELECT "count(ID) as totcw FROM dxqsos2023 where mode = 'CW'");
$totinternet = mysqli_query(SELECT "count(ID) as totinternet FROM dxqsos2023 where mode = 'Internet'");
$tdxcc = mysqli_query(SELECT "count(distinct dxccdesc) as totdxcc FROM dxqsos2023");
?>