•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,477 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,804 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 455 | Replies: 5
![]() |
•
•
Join Date: Aug 2007
Posts: 8
Reputation:
Rep Power: 0
Solved Threads: 0
I'm posting in the PHP forum cause that's what I'm using to connect to MySQL. If there's a better place to post this let me know...
Anyway, I have data that consists of discrete lines of text which must be in a certain order. Like if you were taking a block of computer code with line numbers and storing each line as a row in a table.
That's fine, but when when it comes time to delete a line, we have a gap in the line numbers. So I have to go to each line after the deletion and decrement it's line number so that it's all in continuous order again.
I'm fine with doing that and obviously the code is pretty straightforward, but I wonder if this is the most efficient way. Is there another way of, say, structuring the data that would reduce the load on the sql server? Honestly, there aren't a ton of lines in each data set - maybe a few hundred. So it's possible that the correct answer is "don't worry about it". Just wondering.
Anyway, I have data that consists of discrete lines of text which must be in a certain order. Like if you were taking a block of computer code with line numbers and storing each line as a row in a table.
That's fine, but when when it comes time to delete a line, we have a gap in the line numbers. So I have to go to each line after the deletion and decrement it's line number so that it's all in continuous order again.
I'm fine with doing that and obviously the code is pretty straightforward, but I wonder if this is the most efficient way. Is there another way of, say, structuring the data that would reduce the load on the sql server? Honestly, there aren't a ton of lines in each data set - maybe a few hundred. So it's possible that the correct answer is "don't worry about it". Just wondering.
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- DB design help (MySQL)
- MySQL++ query question (C++)
- very newbie (mysql) question (MySQL)
- Secure MP3 Downloads ?? Help Needed (PHP)
- MySQL Question(s) (MySQL)
- SQL Server vs MYSQL vs MSQL (i'm stopping now) (MS SQL)
- JDBC connection (Java)
Other Threads in the PHP Forum
- Previous Thread: To create url link inside an email body
- Next Thread: Content Mangement System



Linear Mode