forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Sending Http strings to browser with md5 encrypted passwords
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous
View previous topic :: View next topic  
Author Message
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Sat Feb 11, 2012 6:21 pm    Post subject: Reply with quote

Sorry to sound repetitive but I'm not a Php guy which doesn't matter to help you with this. I need to see an example of what %%Query needs to look like.
Quote:
Ok, so if I checked everything in the "Spray Records" group and then clicked the "Query Database" button, what would %%Query need to look like and what is %X?


Are the different groups on the form different tables in the database?

Is this literal
Quote:
?Location=Location&Field_ID=Field_ID&Product=Product&

So if in "Spray Records" Location, Field_ID, and Product were checked
Code:
If @dlgtext(Location)
   %%string = %%string&Location=Location
end
If @dlgtext(spFieldID)
   %%string = ?%%string&Field_ID=Field_ID
end
If @dlgtext(spProduct)
   %%string = %%string&Product=Product
end
# You would continue to do this for the rest of the checkboxes
# then remove the leading "&" character
If @equal(&,@substr(%%string,1))
   %%string = @strdel(%%string,1)
end

info ?%%string
 
Back to top
View user's profile Send private message Send e-mail
Teamgreentech
Valued Newbie


Joined: 07 Dec 2010
Posts: 46
Location: Somerset

PostPosted: Mon Feb 13, 2012 9:36 am    Post subject: Reply with quote

Hi Aslan, apoplogies for delay getting back to you and thanks for your coninued help. Your interpretation is bang on correct Each Group represents a table in the database and each checkbox is a column in the table that we want "Selected" in our return results.

Over the weekend we came of with much the same approach as your example below, then passed the string in a URL to a hidden browser element. On our webserver we have a php script that reads the url and updates a query row for a username equals and thats kind of got us where we want to be + the user can build a history of queries for re searching and a later date....

Whilst we have acomplished our aim I do think it is an uneligant solution and would have much preferred to be able to form the query within the VDS script and passed the whole query through a url to a php script serverside to execute the query on the database. Perhaps we should write a function to do that.....solution

Many thanks once again for your input Alsan, always appreciated.

Aslan wrote:
Sorry to sound repetitive but I'm not a Php guy which doesn't matter to help you with this. I need to see an example of what %%Query needs to look like.
Quote:
Ok, so if I checked everything in the "Spray Records" group and then clicked the "Query Database" button, what would %%Query need to look like and what is %X?


Are the different groups on the form different tables in the database?

Is this literal
Quote:
?Location=Location&Field_ID=Field_ID&Product=Product&

So if in "Spray Records" Location, Field_ID, and Product were checked
Code:
If @dlgtext(Location)
   %%string = %%string&Location=Location
end
If @dlgtext(spFieldID)
   %%string = ?%%string&Field_ID=Field_ID
end
If @dlgtext(spProduct)
   %%string = %%string&Product=Product
end
# You would continue to do this for the rest of the checkboxes
# then remove the leading "&" character
If @equal(&,@substr(%%string,1))
   %%string = @strdel(%%string,1)
end

info ?%%string
 

_________________
Many thanks
Andy @ Team Green Technology
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Miscellaneous All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group