Hi All,

 

I've been banging my head for several hours now.

I've got a mssql backend.

 

What I want to display is;

 

Date 1

Item 1

Item 2

Item 3 ... etc

 

Date 2

Item 1

Item 2

Item 3 ... etc

 

Here's the code I've been fighting with;

$query = "select distinct wn_pdate

                          from whatsnew";

$result = mssql_query($query) or die ("Can not execute query $query. ");

$query2 = "select wn_text, wn_id

                           from whatsnew";

$result2 = mssql_query($query) or die ("Can not execute query $query. ");

 

print "<table border=\"1\" cellpadding=\"5\" cellspacing=\"0\"
class=\"normal_text\">";

            while($row = mssql_fetch_array($result)){

                        print "<tr><td>$row[$rs]</td></tr>";

                        while($row2 = mssql_fetch_array($result2)){

                                    print "<tr><td><a
href=\"$id\">$row2[$rtxt]</a></td></tr>";

                        }

            }

 

What I keep returning is;

Notice: Undefined index: wn_text in c:\inetpub\wwwroot\proto1\wntest.php on
line 17
Then the dates display;

Date 1

Date 2

 

Line 17 is: while($row2 = mssql_fetch_array($result2)){

 

Do I have something wrong with my syntax?

Is there an easier way to do this?

 

 

 

alex

 



****************************************************************** 
The contents of this e-mail and any files transmitted with it are 
confidential and intended solely for the use of the individual or 
entity to whom it is addressed.  The views stated herein do not 
necessarily represent the view of the company.  If you are not the 
intended recipient of this e-mail you may not copy, forward, 
disclose, or otherwise use it or any part of it in any form 
whatsoever.  If you have received this e-mail in error please 
e-mail the sender. 
****************************************************************** 


Reply via email to