Raised This Month: $ Target: $400
 0% 

I believe it's a pretty advanced thing... (database related)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TiToTal
Member
Join Date: Feb 2006
Old 03-07-2006 , 18:02   I believe it's a pretty advanced thing... (database related)
Reply With Quote #1

I don't know if it is possible... but I want to create a variable in pawn language that is a copy of the values in one database...

Well, it's hard to explain what I want because I don't know exatcly what it would be..

Well.. there is one column in the database that has 1 to (infinite numbers, any value I want, it could be 999).. and I would like to have some kind of variable that would be each of this numbers... something that would be like this:

variable[0] means the same as value 0 in one column...
variable[1] means the same as value 1 in the same column...
...

What I am trying to do is like a copy of the column but without creating another in SQL... but I want to have 2 values differents for the columns...
Would be... In the script, one value of the oficial column (database) is assigned... and another value is assigned to another thing in the columns's copy, that would be something like a variable...

I AM TRULY SORRY if it's not clear to understand.. but it was really hard to put in words what I want

If you want to ask me some extra info go ahead...

and if you tell me another way it would be good too
TiToTal is offline
TiToTal
Member
Join Date: Feb 2006
Old 03-08-2006 , 14:35  
Reply With Quote #2

Sorry my double post.. but I didn't even get a "It's impossible answer"
TiToTal is offline
c0rdawg
Senior Member
Join Date: Jan 2006
Old 03-08-2006 , 15:58  
Reply With Quote #3

so are you trying to put everything in a column into an array? because that can be done...
c0rdawg is offline
Send a message via AIM to c0rdawg Send a message via MSN to c0rdawg
TiToTal
Member
Join Date: Feb 2006
Old 03-10-2006 , 11:26  
Reply With Quote #4

it's exatcly what I want... (I think)

How can it be done?
TiToTal is offline
c0rdawg
Senior Member
Join Date: Jan 2006
Old 03-11-2006 , 00:36  
Reply With Quote #5

I would guess you would loop and set the information into the array until there are no rows left... i'm not familiar with the dbi functions so maybe someone else could show you how...
c0rdawg is offline
Send a message via AIM to c0rdawg Send a message via MSN to c0rdawg
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 03-11-2006 , 01:25  
Reply With Quote #6

do a while statement
while(!dbi_nextrow(handle))
{
add in your field into array here
}
Freecode is offline
TiToTal
Member
Join Date: Feb 2006
Old 03-12-2006 , 18:13  
Reply With Quote #7

Quote:
Originally Posted by Freecode
do a while statement
while(!dbi_nextrow(handle))
{
add in your field into array here
}

hmm, thankyou, but... I don't know much of coding... and I don't know exctly what to do

can you maybe explain little more what I have to do to copy an entire column into an array?

But thank you anyway... I don't know what I would do without you guys =D
TiToTal is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode