Search found 67 matches
- Wed Nov 16, 2005 6:09 pm
- Forum: PHP - Code
- Topic: Better way to do it without using IDs?
- Replies: 23
- Views: 5236
- Tue Nov 15, 2005 10:07 pm
- Forum: PHP - Code
- Topic: Better way to do it without using IDs?
- Replies: 23
- Views: 5236
// i is for number of current image... set one for now $i = 1; while ($row = mysql_fetch_assoc($resulta)) { if ($row['name'] == $_GET['pix']) { break; } else { $i++; } } This loop is giving me problems, i am getting wrong results with that one... it always ends up being $i = 1 no matter where I am ...
- Tue Nov 15, 2005 8:51 pm
- Forum: PHP - Code
- Topic: Randomizing monster spawns [SOLVED]
- Replies: 7
- Views: 1504
- Tue Nov 15, 2005 8:09 pm
- Forum: PHP - Code
- Topic: Better way to do it without using IDs?
- Replies: 23
- Views: 5236
- Sun Nov 06, 2005 12:56 am
- Forum: PHP - Code
- Topic: Better way to do it without using IDs?
- Replies: 23
- Views: 5236
Error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '-1, 1' at line 1 You can't have a row at offset -1, row 0 (or maybe 1 i dont even know to be honest) is corresponds to the first row. Nah, number for page wo...
- Sat Nov 05, 2005 9:43 pm
- Forum: PHP - Code
- Topic: Better way to do it without using IDs?
- Replies: 23
- Views: 5236
- Sat Nov 05, 2005 7:10 pm
- Forum: PHP - Code
- Topic: Rainbows!
- Replies: 18
- Views: 8647
- Sat Nov 05, 2005 6:27 pm
- Forum: PHP - Code
- Topic: Better way to do it without using IDs?
- Replies: 23
- Views: 5236
Nah, number for page won't work because I already set it up for view.php?pix=blah.jpg. I can't think of how to make it id=12 instead on my gallery page so I'd like to at least try and get numbers from using pix=blah.jpg So how do I count something and break out when $row['name'] == $_GET['pix'].. wa...
- Sat Nov 05, 2005 6:02 pm
- Forum: PHP - Code
- Topic: Better way to do it without using IDs?
- Replies: 23
- Views: 5236
traversing the results: $offset = 0; while($row = mysql_fetch_assoc($result)) { if($offset == $currentPage) { break; } else { $offset++; } } if(is_array($row)) { // offset was found var_export($row); } Geez I'm lost.. I guess I'll do the $n=1 instead of $pix = blah.jpg for my viewing page. :P Thank...
- Sat Nov 05, 2005 3:19 pm
- Forum: PHP - Code
- Topic: Better way to do it without using IDs?
- Replies: 23
- Views: 5236
ThanksJcart wrote:Its a comparison operator called ternary
- Sat Nov 05, 2005 3:03 pm
- Forum: PHP - Code
- Topic: Better way to do it without using IDs?
- Replies: 23
- Views: 5236
- Fri Nov 04, 2005 10:50 pm
- Forum: PHP - Code
- Topic: Better way to do it without using IDs?
- Replies: 23
- Views: 5236
- Fri Nov 04, 2005 10:04 pm
- Forum: PHP - Code
- Topic: Better way to do it without using IDs?
- Replies: 23
- Views: 5236
So you can see, I only want to show one image at the time... and... I'm not sure how I can do that without ID's...... the url I have given you earlier was a direct url to the viewing page of my gallery. That's what I'm talking about... does anybody have an idea? I don't want it to show rows of stuff...
- Fri Nov 04, 2005 7:36 pm
- Forum: PHP - Code
- Topic: Better way to do it without using IDs?
- Replies: 23
- Views: 5236
Wait, it's for viewing pics...
http://www.dm7.net/gallery/view.php?pix=robotmonkey.jpg
go there so you get a better idea.
http://www.dm7.net/gallery/view.php?pix=robotmonkey.jpg
go there so you get a better idea.
- Fri Nov 04, 2005 5:59 pm
- Forum: PHP - Code
- Topic: Better way to do it without using IDs?
- Replies: 23
- Views: 5236
Better way to do it without using IDs?
Right now I'm using ids to calucate the offsets (yes they works fine.. but a bit buggy... read on to see why), but I don't want to use ids for one reason... whenever I delete a file from the database, the IDs aren't right so therefore it get messed up. So I don't want to use IDs (autoin.), so I'd li...