|
|
Mod Options |
|
#1
|
|||
|
|||
|
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.
No members have liked this post.
|
| Comments |
|
#2
|
|||
|
|||
|
No members have liked this post.
|
|
#3
|
|||
|
|||
|
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). No members have liked this post.
|
|
#4
|
|||
|
|||
|
Install PHPMyAdmin on your server and use it to administer the database. You will find creating your tables a lot easier.
No members have liked this post.
|
|
#5
|
|||
|
|||
|
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?
No members have liked this post.
|
|
#6
|
|||
|
|||
![]() No members have liked this post.
|
|
#7
|
|||
|
|||
|
Thanks
![]() I'll look at that ... No members have liked this post.
|
«
Previous Mod
|
Next Mod
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
| Mod Options | |
|
|
| New To Site? | Need Help? |
All times are GMT. The time now is 04:21.


