Darkforum.com - Dark Stories, Dark Art, Poetry, Photography, Debates and Discussions
Home FAQ
Go Back   Darkforum.com - Dark Stories, Dark Art, Poetry, Photography, Debates and Discussions > Discussions > Debate and Discussion > The Computer Lab
Reload this Page In need of SQL function.
The Computer Lab Discuss In need of SQL function. in the Debate and Discussion forums; Hello fellow techsters, Short and sweet, The Problem , I'm looking for a way to load multiple SQL queries and display them to the screen WITHOUT using an autoincrementing feild, ...
Why not Register and remove some of the ads from The Dark Forums
Reply
 
LinkBack Thread Tools Display Modes
  (#1) Old
webgovernor is Offline
Banned from DF
webgovernor is on a distinguished road
 
webgovernor's Avatar
 
Posts: 161
Gallery: 0
Comments: 0
Join Date: Oct 2004
Location: Euphoria, all the time...
Zodiac Sign: Capricorn
Rating: Not Rated
Credits: 266
   
In need of SQL function. - 11-03-04

Hello fellow techsters,

Short and sweet,

The Problem,

I'm looking for a way to load multiple SQL queries and display them to the screen WITHOUT using an autoincrementing feild, like id.

The reason for this, i'd like to allow users to enter data and have it alphabetically formated when displayed, and allow then to delete their data at will.

Now I'm using mysql_fetch_array with the ID field within a while loop, and I'm dropping and re-inserting the id feild everytime a post is deleted.

Desired Solution,

I'd be incredibly gratefull if someone knew a function to load all of the rows in a field and access them without using an id key.


Well, thanks a lot for the replies in advance!
  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  (#2) Old
Peter is Offline
Non-sequitur
Peter is on a distinguished road
 
Peter's Avatar
 
Posts: 2,841
Gallery: 0
Comments: 0
Join Date: Aug 2001
Location: UK, Middlesbrough
Zodiac Sign: Aries
Rating: Not Rated
Credits: 65,268
   
11-03-04

Wouldn't you just selct without a limit, or with a high limit, like:

Code:
SELECT `post_username`
FROM `phpbbmain_posts`
WHERE 1
ORDER BY `post_username` ASC LIMIT 0, 9999
? I'm probably just not getting what you mean though.


Thanks. Find out exactly what to think, next.

I'm afraid I've left this forum, please read
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  (#3) Old
webgovernor is Offline
Banned from DF
webgovernor is on a distinguished road
 
webgovernor's Avatar
 
Posts: 161
Gallery: 0
Comments: 0
Join Date: Oct 2004
Location: Euphoria, all the time...
Zodiac Sign: Capricorn
Rating: Not Rated
Credits: 266
   
11-03-04

Hi Peter,

thanks for the response,

I'm writing PHP code if that helps, but here's generaly what I use now (in psuedocode):

$id = 0

While $name != "" {
select $table where id = $id;
assign associative array to data;
print link to screen;
$id = $id + 1;
}

That's what I've been using cuz I cant use store all data in a table to an associative array, or a nested associative array, ie: $array[row1[name]], it won't work!

I'm not sure if what I want is possible,

but I do appreciate the response, thanks.
  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  (#4) Old
webgovernor is Offline
Banned from DF
webgovernor is on a distinguished road
 
webgovernor's Avatar
 
Posts: 161
Gallery: 0
Comments: 0
Join Date: Oct 2004
Location: Euphoria, all the time...
Zodiac Sign: Capricorn
Rating: Not Rated
Credits: 266
   
11-29-04

Wow, I'm glad everyone jumped right in to help...

I solved the problem,

SOLUTION: for seamless loading, use an auto-increment feild, but drop and
re-insert it for every row deletion.

Ok, I solved it a very long time ago, but I've dropped that project and decided to use includes... it works much better.

here's the page I'm working on for those who care: http://www.gallatinwebdesign.com

Bah!
  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules

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


Galleries
Toggle Newest Thumbs
RPG
Got Nades?
For Tiggs
A Storm Approaches
A Storm Approaches
A Storm Approaches
The Day I Moved In
blah
Just Me Again
ABU's

Powered by vBadvanced CMPS v3.0 RC2


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
vBulletin Skin developed by: vBStyles.com

© 2006 - 2008 Dark Forum | About Dark Forum | Legal | A member of the Crowdgather Forum Community


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53