Hi guys.
I am in the middle of building a rating application for a customer. It is just an application that allows his customers to leave a review on the services he provides.
Obviously to do this I am going to have to work with databases to store the reviews and display them on his website, for others to see. I have already done this.
But now I am ready to build him an admin area where he can 'log in' and delete testimonials that are no good (if he wishes to).
I already have a database table which contains the testimonials/reviews (sent from his reviews page) and i have named it 'testimonial_data'.
And I created a constant called: TBL_TESTIMONIALS_DATA
..... this is so i can refer to it in SQL statements.
So now I have created another table within the same database called 'admin_accounts' (which contains the usernames and passwords of any existing administrators).
And I created a constant called: TBL_ADMIN_ACCOUNTS
Now this is the point where I am struggling.
I can not figure out how to write an SQL statement that will allow me to gain access to all the rows in the 'testimonial_data' table - based on whether a username and password are matched in the 'admin_accounts' database.
I kind of understand how the first part of the statement would go:
SELECT * FROM " . TBL_TESTIMONIALS_DATA . " ......
........ but I don't know how to finish this statement off so I can include the other table with all the usernames and passwords (admin_accounts).
I want to be able to select all of the rows from 'testimonial_data' if a username and password pair match.
Paul.