[PHP-DB] Please help me with this script...

2001-04-02 Thread SliderĀ©

Hello,

I've been working on this script all day, but I'm getting the same failure
report each time:

Warning: Supplied argument is not a valid MySQL result resource in
c:\program files\apache group\apache\htdocs\motoerit\toon_alles.php on line
23

What could be wrong? This is the code I have:

line 23 is: while(list($ID, $Naam, $Adres, [..] $Bet_rest, $Overig_info)
= mysql_fetch_array ($result))


---

HTML
HEADTITLEBoekingen/TITLE
LINK HREF="motoerit.css" TYPE="text/css" REL="stylesheet"
script language="JavaScript"
 !--
 function openwin(location) {OpenWin = this.open(location, "nieuws",
"width=455,height=333,scrollbars");}
 // --
 /script
/HEAD
BODY
?php

include ("dburl.txt");

mysql_connect  ($dbserver, 'username', 'password');
mysql_select_db('dbname');

if ($orderby == " ")
{$orderby == "ID";
}
$query  = "SELECT * FROM boekingen order by $orderbyASC ";
$result = mysql_query($query);
while(list($ID, $Naam, $Adres, $Postcode, $Woonplaats, $Land, $Telefoon,
$Mobiel, $Fax, $Email, $Aantal_pers, $Voert_aantal, $Voert_soort,
$Voert_merk, $Voert_kent, $Voert_hoogte, $Voert_lengte, $Voert_aanhang,
$Party, $Dat_heen, $Tijd_heen, $Dat_terug, $Tijd_terug, $Maaltijd,
$Hut_soort, $Reiscode, $Reisdoel, $Maatschap, $Dat_voorschot, $Dat_rest,
$Bet_voorschot, $Bet_rest, $Overig_info) = mysql_fetch_array ($result))
 print("TABLE BORDER=0 CELLSPACING=1");
 print("TRTH bgcolor=\"#99\"FONT
COLOR=\"#FF\"ID:/FONT/THTH bgcolor=\"#99\"FONT
COLOR=\"#FF\"Naam:/FONT/THTH bgcolor=\"#99\"FONT
COLOR=\"#FF\"Reisdoel:/THTH bgcolor=\"#99\"FONT
COLOR=\"#FF\"Datum vertrek:/THTH bgcolor=\"#99\"FONT
COLOR=\"#FF\"Datum terugkomst:/FONT/THTH bgcolor=\"#99\"FONT
COLOR=\"#FF\"Datum betaling voorschot:/FONT/THTH
bgcolor=\"#99\"FONT COLOR=\"#FF\"Datum betaling
rest:/FONT/THTHnbsp;/THTHnbsp;/TH/TR");

 print("TRTD  bgcolor=\"#99\"FONT
COLOR=\"#FF\"$ID/FONT/TDTD bgcolor=\"#F5F5F5\"div
CLASS=txtblack$Naam/DIV/TDTD$Reisdoel/TDTD$Dat_heen/TDTD$Dat_
terug/TDTDa href=\"wijzig.php?ID=".$ID."\"Wijzigen/a/TDTDa
href=\"wis.php?ID=".$ID."\"Verwijderen/a/TD/TR\n");

 print("/TABLE");

include ("footer.txt");
?
---

Thanks in advance!

Kind regards,

Paul Sidler



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Please help me with this script...

2001-04-02 Thread Mark Roedel

 -Original Message-
 From: Slider [mailto:[EMAIL PROTECTED]]
 Sent: Monday, April 02, 2001 9:27 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Please help me with this script...
 
 
 Hello,
 
 I've been working on this script all day, but I'm getting the 
 same failure
 report each time:
 
 Warning: Supplied argument is not a valid MySQL result resource in
 c:\program files\apache 
 group\apache\htdocs\motoerit\toon_alles.php on line 23
 
 What could be wrong? This is the code I have:

This usually means there was a problem with your query.  For more info,
including some useable sample code that should help you troubleshoot
exactly what went wrong, see

http://www.php.net/FAQ.php#7.12

---
Mark Roedel ([EMAIL PROTECTED])  ||  "There cannot be a crisis next week.
Systems Programmer / WebMaster  ||   My schedule is already full."
 LeTourneau University  ||-- Henry Kissinger


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]