I've successfully allowed the user to send the message (via mysql). Now Im at the part where Im supposed to retrieve the message and display it in the form; this is where Im stuck. It'd be easy to do if the user has only 1 message in the database, but what if he had more than 1? How would I retrieve them all and display them in the form. Im using this query:
SELECT ToID FROM Message WHERE (ID LIKE @ID)
What it does is check the database for any messages containing the recipient as the user's ID. If the database does in fact contain any message, then the program will display them in the textboxes. But in the case if more than 1 message, how would the database display them in the form? The form has textboxes for: 1. Sender 2. Subject 3. Date.
This is the query I hoped to use for retrieving the message:
SELECT ID, Title, Body, Date, FromUsername FROM Message WHERE (ID LIKE @ID)
Please help? Any other solutions are fine as long as its easy to understand(im new to vb). Much appreciated!