displaying data from a MySQL table
Posted: Mon Mar 08, 2004 12:43 pm
hi there,
I'm quite new to php/MySQl and I was wondering if anyone could help me out. I've basically got a MySQL database with a table called 'Ultra'. In this table i have three fields; 'webspace, database and email' Each of these fields is eaither going to contain a number (from 1 up to about 500000, or is going to say Unlimited) I have two questions, what properties should I set for the fields? should they be set as text or as varchars, what length and null or not null? My second question is i would like to be able to display in plain text on my webpage the data contained in one of the cells. For example I would like to be able to display the data contained in the webspace column as 'unlimited' or as say '100'. Could somebody please write me a small, simle script that I could use for this purpose. i should be able to edit it myself, I just need something that will work for now. My database is at localhost, user = root and has no password. Thank you for any help in advance,
-james moore
I'm quite new to php/MySQl and I was wondering if anyone could help me out. I've basically got a MySQL database with a table called 'Ultra'. In this table i have three fields; 'webspace, database and email' Each of these fields is eaither going to contain a number (from 1 up to about 500000, or is going to say Unlimited) I have two questions, what properties should I set for the fields? should they be set as text or as varchars, what length and null or not null? My second question is i would like to be able to display in plain text on my webpage the data contained in one of the cells. For example I would like to be able to display the data contained in the webspace column as 'unlimited' or as say '100'. Could somebody please write me a small, simle script that I could use for this purpose. i should be able to edit it myself, I just need something that will work for now. My database is at localhost, user = root and has no password. Thank you for any help in advance,
-james moore