Click to See Complete Forum and Search --> : Database Connection


ineedarider
July 30th, 2003, 12:53 PM
I need help with something I am sure is simple if you know what you are doing. I need to pull a number out of my database (total # of users). I want to display a line like:
Example: Ineedarider.Com now has (X)# of users.
X = # of users from database
I know the command is "SELECT count (users) FROM prefix_users"
Problem is, I don't know how to impliment this into an HTML script to get the information and display it. How do you connect to the database? ANd how is the prefix listed (is it localhost? or database name??) ANYONE HELP???? Thanks, jon.

vonarxma
July 31st, 2003, 04:18 AM
I recommend to do this by a serverside script (e.g. PHP, JSP, ASP, ...) or a servlet on your webserver. But there are still other possibilities...

For how to connect to the database this depends on if you are using e.g. jdbc, odbc or ... (please refer the according manual, the connection string mostly contains the servername and the databasename)