Leatherback is gonna kill me if he sees this... :rolleyes:
So, lets my assume my sql connections work, cuz they do. I call this, and it works:
$data = mysql_query( "SELECT * FROM notes WHERE clientid='$id' " );
$a_row = mysql_fetch_array( $data );
Then I populate fields with
whatever field = $a_row['date']
whatever field 2 =$a_row['topic']
whatever field 3 =$a_row['comment']
I'm cool with this part
Then I come to a field that may have anywhere from 0 to 4 attachments listed. Now, how do I set up the while statement? I figured it would look something like this, but for some reason, PHP wants me to tell it exactly what to do, instead of using ESP to know what I want... :rolleyes:
print "<td>";
while //not sure here - looking for "while there are notes"
$data = mysql_query( "SELECT * FROM notefiles WHERE noteid=$a_row['noteid']" )
while ( $b_row = mysql_fetch_array( $data ) ) {
print "<a href=\"../uploads/".$a_row['filename']."\">".$a_row['filename']."</a><br>\n";
Does that make sense? I got this to work fine when there is only one file per record, but now i have to take it up a notch. IT"S EXTREME CODING! SUNDAY SUNDAY SUNDAY! YOU PAY FOR THE WHOLE SEAT, BUT YOU'LL ONLY NEED THE EDGE!
Oof, or its a little late, and the coffee is making me kinda punchy...