
Page: 1
Each time I learn something new related to PHP/MySQL/CSS/Javascript, I will post it here.
Generating previous and next buttons for a none sequential DB, using an auto-incremential primary key:
Why is this important do you ask? Because sometimes when you run a database, even if you have an auto-incrementing primary key, sometimes records get deleted for whatever reason leaving gaps between id records. Ex. You have 10 records in your database, the identifier key spans 1-10. You delete record 5. Now visit record 4, and when you click the next button, it selects record 5. As we know we just deleted this record...uh-oh. It really should be skipping to record 6. Now I go and visit record 6, I hit previous... uh-oh, another broken end. This query will select only the next possible record, sequentially (based on ithe primary auto-increment identifier). Even if gap in sequence exists, it will skip on to the next possible record.
Generating previous and next buttons for a none sequential DB, using an auto-incremential primary key:
SELECT * FROM table WHERE field_id<>2 ORDER BY field_id LIMIT 2;
Why is this important do you ask? Because sometimes when you run a database, even if you have an auto-incrementing primary key, sometimes records get deleted for whatever reason leaving gaps between id records. Ex. You have 10 records in your database, the identifier key spans 1-10. You delete record 5. Now visit record 4, and when you click the next button, it selects record 5. As we know we just deleted this record...uh-oh. It really should be skipping to record 6. Now I go and visit record 6, I hit previous... uh-oh, another broken end. This query will select only the next possible record, sequentially (based on ithe primary auto-increment identifier). Even if gap in sequence exists, it will skip on to the next possible record.
Food for thought:
- The three most important things are: love, knowledge, and truth.
- To be remembered is to live forever.
- It's all about perspective, try to be grateful about life.
- Love happens by accident
Gaming:
DMS3 Modchipped PS2Slimline FTW, the Wii is cool too

- The three most important things are: love, knowledge, and truth.
- To be remembered is to live forever.
- It's all about perspective, try to be grateful about life.
- Love happens by accident
Gaming:
DMS3 Modchipped PS2Slimline FTW, the Wii is cool too


Wow.. This might come in handy since I'm gonna take CompSci...
Neat Fuse! Your the best!!!
Neat Fuse! Your the best!!!
huh
i took web design but not really far..... just basic and some flash
and i dont have any idea of what u typed lol
i took web design but not really far..... just basic and some flash
and i dont have any idea of what u typed lol

nice info fuse!!!
btw what does .dll mean?
btw what does .dll mean?
Normal is synonymous to boring


dll are dynamic link libraries. It's windows way of adding functionality to programs. Such as a graphical users dll would control the generation of the visual layout of a program. So when a programmer comes around they don't need to write their own, but instead can use it. Saves time and energy so programmers can invest more time into more robust features for their programs.
That is just one application.
That is just one application.
Food for thought:
- The three most important things are: love, knowledge, and truth.
- To be remembered is to live forever.
- It's all about perspective, try to be grateful about life.
- Love happens by accident
Gaming:
DMS3 Modchipped PS2Slimline FTW, the Wii is cool too

- The three most important things are: love, knowledge, and truth.
- To be remembered is to live forever.
- It's all about perspective, try to be grateful about life.
- Love happens by accident
Gaming:
DMS3 Modchipped PS2Slimline FTW, the Wii is cool too


Page: 1
Hi RayWindz..how long has it been since ive seen you back? x]


? Where? Where is teh Ruru
J.k
Fuse...
