RE: [PHP] Mysql Rows [END of thread]

2006-03-06 Thread tedd
Hi gang: Miles said: Why are we still chasing this thread? No need to pursue this thread anymore -- I'll just address the statements put to me. Why does he even have to see gaps? Just present the info, unless he wants to see the ID. Miles, I think that's the best solution I've heard t

Re: [PHP] Mysql Rows

2006-03-06 Thread Chris
Barry: I realize that relational dB's are out if one does this -- and -- I fully understand why. That's the reason when I started this thread I made it clear that I was NOT talking about a relational dB but rather a simple flat file. What I find interesting in all of this exchange -- howe

Re: [PHP] Mysql Rows

2006-03-06 Thread Paul Novitski
At 08:57 AM 3/6/2006, tedd wrote: What I find interesting in all of this exchange -- however -- is that everyone agree's renumbering the "id" of a dB is something you don't do, but no one can come up with a concrete (other than relational) reason why. It's simply -- concretely -- inefficient

Re: [PHP] Mysql Rows

2006-03-06 Thread Anthony Ettinger
On 3/6/06, Jim Moseby <[EMAIL PROTECTED]> wrote: > > > > What I find interesting in all of this exchange -- however -- is that > > everyone agree's renumbering the "id" of a dB is something you don't > > do, but no one can come up with a concrete (other than relational) > > reason why. > > > > If y

RE: [PHP] Mysql Rows

2006-03-06 Thread Miles Thompson
At 10:56 AM 3/6/2006, tedd wrote: As such, if you don't renumber, then the only thing left is to use a timestamp, I guess. [/snip] No, if you have gaps you can still step through sequentially, like 14, 15, 18, 19, 20... It's the gaps that are the problem. I have no problem understanding why

RE: [PHP] Mysql Rows

2006-03-06 Thread Jim Moseby
> > What I find interesting in all of this exchange -- however -- is that > everyone agree's renumbering the "id" of a dB is something you don't > do, but no one can come up with a concrete (other than relational) > reason why. If you don't care that a given record may have a different, unpr

Re: [PHP] Mysql Rows

2006-03-06 Thread Anthony Ettinger
On 3/6/06, Dusty Bin <[EMAIL PROTECTED]> wrote: > Another point to consider, is that Tedds method of renumbering the rows, > *may* not preserve the original sequence. I have not checked the mysql > source, but if some delete activity has occurred in the table, then > there will be holes in the dat

Re: [PHP] Mysql Rows

2006-03-06 Thread Dusty Bin
Another point to consider, is that Tedds method of renumbering the rows, *may* not preserve the original sequence. I have not checked the mysql source, but if some delete activity has occurred in the table, then there will be holes in the data, in some circumstances, inserting further records to t

Re: [PHP] Mysql Rows

2006-03-06 Thread Jochem Maas
tedd wrote: Well it seems you output it via PHP so count it extern in PHP. And changing ID values is a "no-go!" You will never have any relation possibilities if you alter the ID fields. In short. You mess everthing up with it. There are count functions in MySQL that gives you the counted row

RE: [PHP] Mysql Rows

2006-03-06 Thread jblanchard
[snip] That's the reason when I started this thread I made it clear that I was NOT talking about a relational dB but rather a simple flat file. What I find interesting in all of this exchange -- however -- is that everyone agree's renumbering the "id" of a dB is something you don't do, but no o

Re: [PHP] Mysql Rows [and whats the difference between Navigational and Relational DBs]

2006-03-06 Thread Jochem Maas
Miles Thompson wrote: I hope the following will be helpful, and it is a bit of a rant .. thank god someone ranted on this already :-) I wasn't feeling up to it but it's also one of those cases that you can't help but speak out. ;-) -- PHP General Mailing List (http://www.php.net/) To unsubscr

Re: [PHP] Mysql Rows

2006-03-06 Thread tedd
Well it seems you output it via PHP so count it extern in PHP. And changing ID values is a "no-go!" You will never have any relation possibilities if you alter the ID fields. In short. You mess everthing up with it. There are count functions in MySQL that gives you the counted rows or output it

Re: [PHP] Mysql Rows

2006-03-06 Thread Barry
tedd wrote: As such, if you don't renumber, then the only thing left is to use a timestamp, I guess. [/snip] No, if you have gaps you can still step through sequentially, like 14, 15, 18, 19, 20... It's the gaps that are the problem. I have no problem understanding why there are gaps in a dB

Re: [PHP] Mysql Rows

2006-03-06 Thread Ray Hauge
On Monday 06 March 2006 07:56, tedd wrote: > So, I'm still trying to find a simple way around this problem. Either > I renumber the "id" field OR provide an external counter to present > to the user. I don't see any other solutions, does anyone? > > Thanks. > > tedd I haven't followed this thread

RE: [PHP] Mysql Rows

2006-03-06 Thread tedd
As such, if you don't renumber, then the only thing left is to use a timestamp, I guess. [/snip] No, if you have gaps you can still step through sequentially, like 14, 15, 18, 19, 20... It's the gaps that are the problem. I have no problem understanding why there are gaps in a dB and dealing

RE: [PHP] Mysql Rows

2006-03-06 Thread jblanchard
[snip] >You must have a column that is sequential in some way. An >auto-incremented column, timestamp, or some other device that will allow >you to step through regardless of gaps in sequence. If you do not have >such a column then you could add one. You see, now that's the problem. If you have a

Re: [PHP] Mysql Rows

2006-03-05 Thread tedd
Gustav: In any event, I just tested your claim on my host and I was able to renumber 50,000 records in less than 1/2 second. Even though I tried it several times, the results were never above 0.47 seconds. If I was dealing with a database that was accessible to others, then I would either loc

Re: [PHP] Mysql Rows

2006-03-05 Thread Gustav Wiberg
- Original Message - From: "tedd" <[EMAIL PROTECTED]> To: Cc: "Gustav Wiberg" <[EMAIL PROTECTED]>; "Robert Cummings" <[EMAIL PROTECTED]> Sent: Sunday, March 05, 2006 12:58 AM Subject: Re: [PHP] Mysql Rows Hi: Gustav said: No, may

Re: [PHP] Mysql Rows

2006-03-05 Thread Curt Zirzow
On Sun, Mar 05, 2006 at 08:01:07AM -0500, tedd wrote: > R O B said: > > >That Rod guy, he's such a card! I'd add something, but Jay has already > >covered my list in a more recent email than this one to which I'm > >responding :) > > jblanchard (who I think is Rod) said: > > >A SQL question on a

RE: [PHP] Mysql Rows

2006-03-05 Thread jblanchard
[snip] R O B said: >That Rod guy, he's such a card! I'd add something, but Jay has already >covered my list in a more recent email than this one to which I'm >responding :) jblanchard (who I think is Rod) said: [/snip] I am definitely not Rod. [snip] For sake of argument, let's agree that renum

Re: [PHP] Mysql Rows

2006-03-05 Thread chris smith
On 3/6/06, tedd <[EMAIL PROTECTED]> wrote: > R O B said: > > >That Rod guy, he's such a card! I'd add something, but Jay has already > >covered my list in a more recent email than this one to which I'm > >responding :) > > jblanchard (who I think is Rod) said: > > >A SQL question on a PHP mailing l

Re: [PHP] Mysql Rows

2006-03-05 Thread tedd
R O B said: That Rod guy, he's such a card! I'd add something, but Jay has already covered my list in a more recent email than this one to which I'm responding :) jblanchard (who I think is Rod) said: A SQL question on a PHP mailing list usually gets more than ribbing. ;) No harm done -- I

Re: [PHP] Mysql Rows

2006-03-04 Thread Robert Cummings
On Sat, 2006-03-04 at 18:58, tedd wrote: > Hi: > > Rod said: > > >*LOL* I knew those MySQL people shouldn't have made the ALTER TABLE > >syntax available to just anyone. Gun --> foot --> *BLAM*. I hope to God > >you never get your hands on a real database with millions of entries. > > I'm glad th

RE: [PHP] Mysql Rows

2006-03-04 Thread jblanchard
[snip] I'm glad that you were amused. Considering that I was talking about a flat dB, then you have already shot yourself in the foot if your "real database" is in the millions of entries and is flat. I hope to God that normalization may be something you consider in your next database design. [

RE: [PHP] Mysql Rows

2006-03-04 Thread jblanchard
[snip] my reasoning for needing the users number in a database is this... i am going to be doing a lottery type thing where i grab a random number between 1 and the result of mysql_num_rows($result)... that is the reason the gaps matter. the while loop didn't work for me so if anyone could help m

Re: [PHP] Mysql Rows

2006-03-04 Thread Robert Cummings
urray @ PlanetThoughtful" > <[EMAIL PROTECTED]>; "Anthony Ettinger" <[EMAIL PROTECTED]> > Sent: Saturday, March 04, 2006 2:29 PM > Subject: Re: [PHP] Mysql Rows > > > > > > - Original Message - > > From: "Robert Cummings"

Re: [PHP] Mysql Rows

2006-03-04 Thread tedd
Hi: Gustav said: No, maybe not when it's a small db, but when you try to delete 50.000 posts I have a strong feeling this would be very much slower then if you don't alter table after each deletion. First, I'm not deleting 50,000 records -- I dropping a table and renumbering it. In any ev

Re: [PHP] Mysql Rows

2006-03-04 Thread benifactor
t; ; "benifactor" > <[EMAIL PROTECTED]>; "Murray @ PlanetThoughtful" <[EMAIL PROTECTED]>; > "Anthony Ettinger" <[EMAIL PROTECTED]> > Sent: Saturday, March 04, 2006 9:41 AM > Subject: Re: [PHP] Mysql Rows > > > > On Sat, 2006-03-0

Re: [PHP] Mysql Rows

2006-03-04 Thread benifactor
ttinger" <[EMAIL PROTECTED]> Sent: Saturday, March 04, 2006 9:41 AM Subject: Re: [PHP] Mysql Rows > On Sat, 2006-03-04 at 09:14, tedd wrote: > > planetthoughtful wrote: > > > > >But, too often I've seen people new to database design not liking > &

Re: [PHP] Mysql Rows

2006-03-04 Thread Robert Cummings
On Sat, 2006-03-04 at 09:14, tedd wrote: > planetthoughtful wrote: > > >But, too often I've seen people new to database design not liking > >'gaps' because 'user1' will have a unique id of '1', while 'user2' > >will have a unique id of '6' because the records associated with > >unique ids '2'

Re: [PHP] Mysql Rows

2006-03-04 Thread Gustav Wiberg
- Original Message - From: "tedd" <[EMAIL PROTECTED]> To: Cc: "benifactor" <[EMAIL PROTECTED]>; "Murray @ PlanetThoughtful" <[EMAIL PROTECTED]>; "Anthony Ettinger" <[EMAIL PROTECTED]> Sent: Saturday, March 04, 2006

Re: [PHP] Mysql Rows

2006-03-04 Thread tedd
planetthoughtful wrote: But, too often I've seen people new to database design not liking 'gaps' because 'user1' will have a unique id of '1', while 'user2' will have a unique id of '6' because the records associated with unique ids '2' through '5' were deleted during testing, and so on. So,

Re: [PHP] Mysql Rows

2006-03-04 Thread Miles Thompson
I hope the following will be helpful, and it is a bit of a rant .. The row number DOES NOT MATTER and is absolutely irrelevant. MySQL is a relational database from which information is gathered by means of comparing fields to key values. Even if you are using an auto-incremented primary key

Re: [PHP] Mysql Rows

2006-03-03 Thread Murray @ PlanetThoughtful
On 4/03/2006 5:36 PM, Anthony Ettinger wrote: Yep, that's one good reason among many for using unique ids. Thinking a little about the OP's question, I could understand row order being relevant in certain situations where you wanted to display something like, "You were the 4

Re: [PHP] Mysql Rows

2006-03-03 Thread Anthony Ettinger
On 3/3/06, Murray @ PlanetThoughtful <[EMAIL PROTECTED]> wrote: > > > > >> I have to agree with Anthony - why are you using row order to determine > >> something relating to users? I couldn't follow your brief explanation > >> above, and the fact that you're doing it sets off some soft alarm bells

Re: [PHP] Mysql Rows

2006-03-03 Thread Murray @ PlanetThoughtful
I have to agree with Anthony - why are you using row order to determine something relating to users? I couldn't follow your brief explanation above, and the fact that you're doing it sets off some soft alarm bells about the design of your application. Why is it important that there shouldn't be

Re: [PHP] Mysql Rows

2006-03-03 Thread Anthony Ettinger
not be what is not acurate enough. thank you for you help. simple fix. i > > should have caught it. > > - Original Message - > > From: "Anthony Ettinger" <[EMAIL PROTECTED]> > > To: "benifactor" <[EMAIL PROTECTED]> > &

Re: [PHP] Mysql Rows

2006-03-03 Thread Murray @ PlanetThoughtful
. - Original Message - From: "Anthony Ettinger" <[EMAIL PROTECTED]> To: "benifactor" <[EMAIL PROTECTED]> Cc: "php" Sent: Friday, March 03, 2006 3:52 PM Subject: Re: [PHP] Mysql Rows define $1 = 0 outside your loop. i'm curious why you are relyin

Re: [PHP] Mysql Rows

2006-03-03 Thread benifactor
thony Ettinger" <[EMAIL PROTECTED]> To: "benifactor" <[EMAIL PROTECTED]> Cc: "php" Sent: Friday, March 03, 2006 3:52 PM Subject: Re: [PHP] Mysql Rows define $1 = 0 outside your loop. i'm curious why you are relying on row-order in the database? Typica

Re: [PHP] Mysql Rows

2006-03-03 Thread Anthony Ettinger
define $1 = 0 outside your loop. i'm curious why you are relying on row-order in the database? Typically you'd have a PRIMARY KEY auto_increment for something like this. On 3/3/06, benifactor <[EMAIL PROTECTED]> wrote: > i need to find a way to find out what number of a row is in a database... >

Re: [PHP] mySQL: Rows and columns

2003-06-18 Thread Philip Olson
On Wed, 18 Jun 2003, zavaboy wrote: > I know this is more of a mySQL question but, how do I delete and add rows > and columns? Before you touch MySQL or attempt to access it through PHP, you really should learn basic SQL: http://www.sqlcourse.com/ http://www.w3schools.com/sql/ http://linux

RE: [PHP] mySQL: Rows and columns

2003-06-18 Thread Boaz Yahav
how about : Start Using MySQL http://articles.weberdev.com/ViewArticle.php3?ArticleID=247 Beginners guide to PHP/MySQL - Creating a simple guest book http://articles.weberdev.com/ViewArticle.php3?ArticleID=26 Sincerely berber Visit http://www.weberdev.com/ Today!!! To see where PHP might take

Re: [PHP] mySQL: Rows and columns

2003-06-18 Thread Lars Torben Wilson
On Wed, 2003-06-18 at 10:03, zavaboy wrote: > I know this is more of a mySQL question but, how do I delete and add rows > and columns? > > -- > > - Zavaboy > [EMAIL PROTECTED] > www.zavaboy.com Using the mysql_*() function and the SQL language. The mysql_*() functions are documented here: h

Re: [PHP] mySQL: Rows and columns

2003-06-18 Thread bbonkosk
http://www.mysql.com/doc/en/ALTER_TABLE.html > I know this is more of a mySQL question but, how do I delete and add rows > and columns? > > -- > > - Zavaboy > [EMAIL PROTECTED] > www.zavaboy.com > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www

RE: [PHP] mySQL: Rows and columns

2003-06-18 Thread Aaron Gould
A search on mysql.com reveals. http://www.mysql.com/search/index.php?q=DELETE&from=%2Fdocumentation%2Findex .html -- Aaron Gould Web Developer Parts Canada -Original Message- From: zavaboy [mailto:[EMAIL PROTECTED] Sent: June 18, 2003 1:03 PM To: [EMAIL PROTECTED] Subject: [PHP]