hey gang-

(more php problems apparently...LOL)

I am trying to do a simple query to the DB.. using a specific userID.. as well as return rows between a date range...

I tested the queries in phpMyAdmin.. and they worked fine.. when I threw them into a PHP script, to try and out put the data as XML using a while() loop..

I got 'nothing'...

I dont get any errors when I try to access the script directly through the browser (using WAMP Server to server it up)..

but I 'also' dont get any rows spit out (echo'd) to the screen either?


it would be a bit easier if I got an error to help guide me in my mistake...but I got nothing?

Looking at the source code of the page.. it seems the XML is 'there', structured correctly?


php code:
PHP Code:

<?php 

    $myDB 
mysql_connect('localhost''root''') or die('Connection failed!');

    
mysql_select_db('fac_paymentdb'$myDB);

    
$query "SELECT * FROM payments WHERE collectorID = 'DMD' AND date(subDate) >='2012-01-01' AND date(subDate) <= 

'2012-10-17'"
;

    
$result mysql_query($query$myDB); 

    
$xml_output  "<?xml version=\"1.0\"?>\n"
    
$xml_output  .=  "<payments>\n";

    while(
$row mysql_fetch_assoc($result)){
        
$xml_output .= "\t<payment transID='" $row['transID'] . "' subDate='" $row['subDate'] . "' collectorID='" 

$row['collectorID'] . "' pFirst='" $row['pFirst'] . "' pMiddle='" $row['pMiddle'] . "' pLast='" $row['pLast'] . "' pAddress='" "' />\n";
    }


    
$xml_output .= "</payments>";


    echo (
$xml_output);

?>

1.) Is this even WRONG?
2.) I seem to recall in the past seeing the XML data structure in the browser if I targeted the script directly?

(is this a situation of using echo() vs print() perhaps?)


thanks