PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have this function that retrieves events from a database and displays them nicely in an html table and allows the user to order them by their respected columns. the problem is I create a row to allow for a link called edit that a user could click to edit the event and I have it linked to the event id but it only displays the top most id and just repeats it for the rest of the results. Here's the function:
Sorry, perhaps I wasn't very clear. When I have the function as shown, when it outputs the table the last column is called edit. It adds the edit url to the end of all the rows retrieved from the database and links them to a page. However when I use $row[id] it only shows the correct id for the first displayed row. All the other rows are the same as the first. It doesn't update each individual row to reflect the correct id.
aspekt9 wrote:Sorry, perhaps I wasn't very clear. When I have the function as shown, when it outputs the table the last column is called edit. It adds the edit url to the end of all the rows retrieved from the database and links them to a page. However when I use $row[id] it only shows the correct id for the first displayed row. All the other rows are the same as the first. It doesn't update each individual row to reflect the correct id.
Could it be your not using $row for anyother of the variables from the Query....???