Register Members List Search Today's Posts Mark Forums Read

 
 
Mod Options
  #1  
Old 28 Nov 2000, 23:03
Guest
 
Ok, I need to create a table (in the database) that uses two keys (userid and forumid) and one value stored (time). I know a little bit how to create a table, but I don't know everything about how the function used to do this works.
Comments
  #2  
Old 28 Nov 2000, 23:44
Guest
 
http://www.php.net/manual/ref.mysql.php

-jim
  #3  
Old 29 Nov 2000, 13:05
Guest
 
Yeah, that explains a bit about mysql functions ... but what I have to do uses "$DB_site->query("{query}")" instead of one of those mysql functions listed on there (although it may be the same as mysql_query()), what I have to do to create the table is use a function like this:

$DB_site->query("CREATE TABLE forumread (
timeread int(10) DEFAULT '0' NOT NULL,
forumid int(10) unsigned DEFAULT '0' NOT NULL,
userid int(10) unsigned DEFAULT '0' NOT NULL,
PRIMARY KEY (forumid),
UNIQUE userid (userid),
KEY userid_2 (userid))");

except that I want two fields and one row, not just one field like in the tables used for users, posts, threads, etc. and I'm not totally sure how to do this (which is why the code above may be wrong).
  #4  
Old 29 Nov 2000, 17:34
Guest
 
Install PHPMyAdmin on your server and use it to administer the database. You will find creating your tables a lot easier.
  #5  
Old 01 Dec 2000, 21:19
Guest
 
Yeah, I guess that would help ... I already know how to add/remove rows to a table, but not much about how to add/remove tables. Where can I get PHPMyAdmin, is it at the PHP home page?
  #6  
Old 01 Dec 2000, 21:27
Guest
 
Originally posted by Acmlm
Yeah, I guess that would help ... I already know how to add/remove rows to a table, but not much about how to add/remove tables. Where can I get PHPMyAdmin, is it at the PHP home page?
http://www.phpwizard.net

  #7  
Old 01 Dec 2000, 21:41
Guest
 
Thanks

I'll look at that ...
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 04:21.

Layout Options | Width: Wide Color: