PHP and MySQL Problem (simple, I'm sure)
| From: | Ben Ocean | Date: | Sun, 22 Oct 2000 15:10:02 +0000 |
| Subject: | PHP and MySQL Problem (simple, I'm sure) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-21636@lists.php.net to get a copy of this message | ||
Hi;
I'm taking a script I wrote that worked for one client and trying to tweak it for another client. These clients are built on the same server. I have run into this error message:
Warning: 0 is not a MySQL result index in /apache/vhosts/thewebsons/Clients/NWHotSpring/Spas/Find_the_Perfect_Spa/index.php3 on line 81
Here is the script circa line 81...
if ($colorz != 9 ) { // ADD THIS LATER && $seatingz !=9 && $typez != 9) {
echo "<center><font style=\"font: 800 25px futura\">Here's Your Spas!</font></center>";
echo "Click on any spa.";
/* LINE 80 */ $result = mysql_query("SELECT id, seating, color_one, color_two, color_three, type, name, jets, jets_one, jets_two, jets_three, jets_four, jets_five, jets_six, jet_system, dimensions, capacity, dry, filled, light, control, heater, thermostat, jetPumps, circulationPump, filter, filtration, water_care, price FROM spas ORDER BY price DESC");
$total_rows = mysql_numrows($result); $counter = 0; $countertwo = 0;
while($counter < $total_rows):
do a bunch of stuff...
Can someone please help me?
Also, I'm wondering if there's a more elegant way to label variables than this:
$seatingee = mysql_result($result,$counter,"seating"); If I don't need *seating* any more, can I simply call the result *$seating* instead of *$seatingee* ?TIA, BenO