|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Only 10 entries for table
I only want to allow 10 newest signups to be stored in my table.. do I use INSERT INTO or UPDATE?
this will be used on a member join script for my site, I want to display the 10 most recent member joins without having to use SELECT with a LIMIT. right now I am using: mysql_query("INSERT INTO `newestusers` VALUES ('$username','$id')"); and then just selecting the data with LIMIT I just dont want a bunch of un-used data sitting in the table if it doesnt have to. Thanks guys. |
|
#2
|
||||
|
||||
|
there is absolutely no point to doing this.
how about this, create a view Code:
CREATE VIEW newestusers AS SELECT * FROM users ORDER BY joined_date DESC LIMIT 10 Code:
select * from newestusers although, exactly what is the point of this? why are you against using normal, proven methods?
__________________
carouth.com |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > Only 10 entries for table |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|