Reply
Database Help
Old 04-21-2004, 09:52 PM
wipeout's Avatar
Skilled Talker

Posts: 90
Location: Canada
How so?
I found it be a desent idea. Maybe not a mySQL table. But a simple text file should do just fine I would think.
Meh, then again I am pretty amatuar when it comes to php.
But you wait one day I will rule all! Muhahahaha...
lol jokes


Meh give me credit. I dont think there a to many 16 year old geeks who could program in php. I only know of one other guy and he is on my msn and doesn't even live close to me.

Who was it that said..
"Lazy is just another way of saying really efficient"
__________________
PHP Code:
<?
  $User 
'wipeout'
  
$Class 'zombie'

  
phpGroupy('$User, da ,$Class')
?>
wipeout is offline
Reply With Quote
View Public Profile Visit wipeout's homepage!
 
Old 04-21-2004, 10:03 PM
Christopher's Avatar
Iced Cap

Latest Blog Post:
Encoding Numbers as Base 36
Posts: 3,108
Location: Toronto, Ontario
I'm a 15 year old geek and program PHP There are many talented young programmers out there, just because they don't explicitly tell their age doesn't mean they don't exist

Anyway, you can use the DESC and LIMIT clauses in mySQL to grab the last row from the database, writing to a file or creating a new table that will hold one row is overhead.
__________________
Devlog - Latest PHP Article: MVC with the Zend Framework
::The New Tech - Technology Forum
Christopher is offline
Reply With Quote
View Public Profile Visit Christopher's homepage!
 
Old 04-21-2004, 10:09 PM
wipeout's Avatar
Skilled Talker

Posts: 90
Location: Canada

Realy thats awsome. Oviously you are one step ahead of me. But I disagree (mainly for the fact that I USED to feel special lol), there seem to be an abundance of kids like us out there. I haven't found many. Either way...

I apluad you for your genius...


And you still haven't told me what is so overhead about saving to a file?
__________________
PHP Code:
<?
  $User 
'wipeout'
  
$Class 'zombie'

  
phpGroupy('$User, da ,$Class')
?>
wipeout is offline
Reply With Quote
View Public Profile Visit wipeout's homepage!
 
Old 04-21-2004, 10:20 PM
Christopher's Avatar
Iced Cap

Latest Blog Post:
Encoding Numbers as Base 36
Posts: 3,108
Location: Toronto, Ontario
http://forums.teencoderz.com/
There's about 130 of 'em. vBulletin has a couple really talented vB hackers as well.

Your working with extra data and extra code that simply isn't necessary.

There are certain things where it might be practical, for example, vBulletin uses a 'datastore' system that holds certain data. This is a table that holds about 10 rows of frequently used data so it can grab all of it in one query. But to use something for one value alone isn't worth the hassle when you can grab it using one query.

Using a file isn't as bad, but again, your using resources that don't need to be used. Every time a contact is added, you'd need to write to the file, which requires a file handler, error checking to make sure its writable etc. While if you just grab the last row, you most likely already have a connection to the database and all you have to do is execute one query. No updating needed.
__________________
Devlog - Latest PHP Article: MVC with the Zend Framework
::The New Tech - Technology Forum
Christopher is offline
Reply With Quote
View Public Profile Visit Christopher's homepage!
 
Old 04-21-2004, 10:31 PM
wipeout's Avatar
Skilled Talker

Posts: 90
Location: Canada
hmmm... lol... it apears once agian you have shown me up...
But thanks for the useful link...


And yea I saw that coming acctualy. But I am sure if you are looking for a completly useless little fact like newest user, you would have a few other things that might need to just be stored away. So believe it or not I was implying the use for bunch of little things.

And as for a file handler... Meh....
Error checking? I am sure you already have error checking on your sign up....

But either way I think we are getting alittle off topic.
Plesure being called a n00b lol....


Meh w/e I script becuase I think its fun. Not to be the king of the geeks lol..
Though the title would be nice..
__________________
PHP Code:
<?
  $User 
'wipeout'
  
$Class 'zombie'

  
phpGroupy('$User, da ,$Class')
?>
wipeout is offline
Reply With Quote
View Public Profile Visit wipeout's homepage!
 
Old 04-22-2004, 12:20 PM
j0e
Average Talker

Posts: 23
Location: UK
A fair few KB are used to define the table (field types/headings for a start)... and it would take more code => more file size and more time (as Chroder says).

Anyway, how is phreek getting on?

I'm 16 aswell, not that it matters. I don't see why that should make a difference to your 'coding ability'.
j0e is offline
Reply With Quote
View Public Profile
 
Old 04-22-2004, 03:35 PM
wipeout's Avatar
Skilled Talker

Posts: 90
Location: Canada
Arg for the sake of not being a mod and caring about being of topic...
Ok I never said it was a problem being 16...
I siad there arn't many of us around and I donno about you guys but I feel acomplished for takin an interest in this kinda stuff and not being outside smokin up all day (no that thats bad either lol)....

The only reason I said that was to point out that I am pretty young and have only been on the PC for a couple years...
Older you are the wiser and more experienced right (though its almost becoming clear that this isn't true due to chroders genus)?

And I have done this a couple times for certain things and I bet there is no difference in acctual load speed...
Just a difference in how long it takes to write the code and stuff...
That and in those cases I also needed to be able to download that text file whenever too...
So I guess thats the reason I liked it...

Meh, you guys are clearly more experienced and know more of the functions of php....
For us newer amaturs, I think find easy ways out is ok....
Then you can improve later when you learn something new right...
I am always continuosly rewriting code to be more efficient as I learn more and more...

Sorry for even subjesting the idea... jeez... youd think I shot the mayor or somin.....
__________________
PHP Code:
<?
  $User 
'wipeout'
  
$Class 'zombie'

  
phpGroupy('$User, da ,$Class')
?>
wipeout is offline
Reply With Quote
View Public Profile Visit wipeout's homepage!
 
Reply     « Reply to Database Help

Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.14682 seconds with 12 queries