hello
i'm trying to return a query with four fields,
one row per line until all data is returned
i need to concatenate a URL to the first field only in each row/each line
end result being:
URL+Field1, Field2, Field3, Field4
URL+Field1, Field2, Field3, Field4
URL+Field1, Field2, Field3, Field4
URL+Field1, Field2, Field3, Field4
What I'm getting is one single row - nothing else
How do I repeat the row?
Code Used::
$rs = mysql_query("SELECT blah FROM blah") or die ("invalid query");
while ($row = mysql_fetch_assoc($rs)) {
printf ("field1: %s field2: %s field3: %s field4: %s", "http://URL?id="; . $row["field1"], $row["field2"], $row["field3"], $row["field4"] . "\n");
}
mysql_free_result($rs);
thanks