Comparing Results From 2 Different Arrays (checkboxes)

I have two arrays which are values for checkboxes and I need to compare them, The first array I created which is the checkbox values that were selected previously Code:

View Replies


ADVERTISEMENT

Comparing Arrays

basically the first array holds all the text_ids for the table text and the second array holds all the text_ids on a table join. What i mean is i have joined two tables text and text_section and it lists all the textids in the section.

i need to return a list of the textids that are not listed in the section so i need a way of comparing the two arrays and pulling out the ids that appear in array1 and not array 2 .

View Replies View Related

Comparing Arrays From Two Databases For Validation.

I have an ASP page where I build a table with specific links based upon an Array (array1) from a SQL Server Stored Procedure. Everything works.

Now I am told I need to validate the Array(array1) from a table located in a different DB.

I figure I can build another Array (array2) from another SP and then do a compare to build yet another Array (array3) that will be used to populate the table.

The two tables are not the same except the second table will have the same "ID" for each record that is valid.

I have been searching high and low for an example of the loop statement(s) I would need to do this.

I can not find anything. Can this actually be done?

View Replies View Related

Arrays Of Checkboxes

I have two related tables in my database. One stores events and the other stores a list of key topics.

I have an interface set up where users can add / edit events.

In the add event page, I am querying the "key topics" table and returning them as options (array of checkboxes). The user makes their pick, and submits. All the data saves in the 'event" table, including the primary id of the "topics".

That part works great. The problem I am having is when the EDIT event page resolves, I am trying to "check" the options that were previously saved.

First thing I do (at the top of the page) is to query the events table to pull all of the data out. I use the 'events" table to do this.

For the checkboxes, I am once again looping through them in a query that uses the "key topics" table. So the boxes are displayed, but I can't seem to get the logic right to have the appropriate ones checked. here is my current code:

View Replies View Related

Checkboxes And Arrays

at the moment i am creating a shopping cart of sorts. Simply the user selects the check boxes of the items he wants and clicks submit. The items are dynamically created and they could select anything from 1 to 100 items..

so processing the form is clear not possible by hard coding. How could i read all the values from the POST into an array instead of processing each item at a time.

View Replies View Related

Problem With Checkboxes - Arrays In ASP

I have a html page with 20 checkboxes in it. I want to compare the value av the checkboxes ( when the user choose them) with an array which has 5 values.
My checkboxes have different values but same name....

It has to work like this that the user marks the checkboxe and sumbit the form. The result should sends as an email and my program has to compare the checkboxes values and the values in my array och write the result in the email that should be send away.

View Replies View Related

Checkboxes, Arrays, & Session Variables

Basically each page has a checkbox for each item and they should be able to click the items they want to add and continue on, and at the end it creates a dynamic report to give to a customer. On the first page there are 9 check boxes. The access database table called "IMAP" has two columns: "id" (primary key) with values 1 thru 9 and a column "active" with the yes/no type. Code:

View Replies View Related

Comparing Database Results

I have two variables

DIM medical_crew_1
DIM crew_name

One was created by joining the results of a database query

'first connect and query the first database table ........

objRS("first_name")
objRS("last_name")

crew_name = objRS("first_name") & " " & objRS("last_name)

I am comparing this variable with the second variable which comes from a
seperate table in the same database Code:

View Replies View Related

Comparing Value

I have an array, let's say: a(test1, test2, test3). test1 = 1, test2 = 3, test3 = 4.
I have a for loop:
for z= 0 to 2
if a(z) > 0 then (what I am trying to do is if test1 > 0 then do ...)
somecode
end if;
next
Could anyone let me what is wrong with my if statement? The code inside the if statement does not executed.

View Replies View Related

Comparing

let.... the strings are

a="234.5;678.3 "
b="678.3 "

on comparing this two i want to get 0 if the b value dosnt exist in a must return 1 .

View Replies View Related

Comparing Strings

i am having a problem with comparing two strings. I am taking
in the parameter rs("Company") and if this is empty i want to put some
text in there. I am testing it with an empty Company field and comparing
it like so:

temp1=rs("Company")
temp2=StrComp(temp1,NULL)

I have also tried it with
temp2=StrComp(temp1,"")

but each time i get nothing returned. Is there some rule about comparing a
string with an empty string?

View Replies View Related

Comparing Dates

I have an expiry date stored as a text field in the
following way "2003-08-23" (this gets round the US/UK
date prob)

The problem is I want to be able to show a Renew option
on the page FROM 30 days prior to that date. And then of
course if they don't renew, it unsubscribes them.

Question, how can I compare this date to see if todays
date is 30 days or closer to the expiry date?

View Replies View Related

Comparing Two Fields

Is there a way to do the following select (like in Dlookup?)

SELECT Permit_No FROM Table1 WHERE Table1.Address like Table2.Address

I want to get Permit_No from table1, but its WHERE condition depends on comparing two address fields in different tables. Will that work?

View Replies View Related

Comparing Tables?

I have this page with a drop down box which loads the itemnumbers dynamically. However, I want it to NOT load the numbers that already exist in the weborderlist. What can I do to my SQL statement to make this work?

Code:

SELECT (SELECT img_inv.item_num from img_inv, weborderlist WHERE img_inv.item_num <> weborderlist.item_num and weborderlist.orderid= '1') as test

View Replies View Related

Comparing Dates

how can i redirect a user when its 2 days before New Years, based on Date().

View Replies View Related

Comparing Two Tables

How do I compare the contents of two tables, to see what doesn't exist in the one table?

Something like "select company.name, company_scores.company_name from
company, company_scores where company.name not in
company_scores.company_name" ?

View Replies View Related

Comparing Unicode Value

Need to do a search engine to search through a bunch of static pages (html)). so uing asp. but the page is in chinese, so how do i scan each and every html file and search for the chinese word?

View Replies View Related

Comparing Of Recordsets

I have the following code with me Code:

<%
rs=Server.CreateObject("ADODB.recordset");
rs1=Server.CreateObject("ADODB.recordset");
sql="select coi_index_number,status,mkt_id_swno_0,mkt_id_swno_ 1,mkt_id_swno_2,mkt_id_swno_3,mkt_id_swno_4,mkt_id _swno_5,mkt_id_swno_6,mkt_id_swno_7,circle,name_of _msc from coi where coi_index_number='"+p2+"'";
sql1="select coi_index_number,status,mkt_id_swno_0,mkt_id_swno_ 1,mkt_id_swno_2,mkt_id_swno_3,mkt_id_swno_4,mkt_id _swno_5,mkt_id_swno_6,mkt_id_swno_7,circle,name_of _msc from coi1 where coi_index_number='"+p2+"'";
%>

Now i need to compare these two above mentioned recordsets....and want to pop up an alert box on the client side.....sayin whether they are same or no.

View Replies View Related

Comparing Fields

I have a simple html/asp form that submits data to an access DB. The idea is when calling a record back from the db, the page will have an option to change certain fields (drop down) then a new submit option. My question at this point would be what logic or commands would I use to compare the original data in the fields to what's being submitted.

I ultimately want to preserve the original records and somehow append data that changes only. I'll need to eventually call a record and see all the changes/updates made. Someone mentioned I would prob need a couple of tables with a link (relationship) but is it possible to dynamically create fields as changes are made?

View Replies View Related

Comparing Dates

I have ASP code to compare an input date and the current date. If the input date is less than today, it should give an error message. It does do this, except it doesn't consider the year, only the month and day. If I input 7/12/2004, it will not catch the discrepancy, but if I input 2/3/2005, it will. Here is the code...

SDate=FormatDateTime(Request.QueryString ("PickupDate"), 2)
FDate=FormatDateTime(Date(), 2)

If (SDate<=FDate) then

msg="You must enter a date greater than today."

Response.Write("<b><font color=red>"& msg & "</b></font><BR>")

Exit Sub

End If

View Replies View Related

Comparing Dates ?!?

Comparing dates ?!? I having fun with dates, NOT….. I have a place where I need to compare 2 dates. Even though they are the same they will not be compared as the same in an IF statement.

Donw is a # of the day of the month, IE: 26 that is pulled from a data base. The goal is to compare dats like this :

IF ( donw ) = day(now) then
----Red stament Do this Bla Bla----
Elseif (donw ) = day(now) – 1 then
----Yellow stament Do this Bla Bla----
Elseif (donw) < day(now) then
----Green stament Do this Bla Bla----
end if

View Replies View Related

Comparing Variables

Is there any way to compare a set of varibles to find the one that contains the biggest number? and also the one that contains the 2nd biggest.

View Replies View Related

ASP Comparing Time (w. AM/PM)

I need to compare the actual time on my server to the value I'm receiving on a database.
For example, let's say the actual time is 1:45 PM and the value in the database is 11:52 AM. I need to compare that if the actual time is after the one on the database, it returns a true value, if not returns a false value.

I tried this ASP code, bit it didn't worked, any ideas? Code:

View Replies View Related

Comparing Two .mdb Files

Is it possible to compare two .mdb files? I would like to find dupicates in two tables in two different .mdb files.

View Replies View Related

Comparing Date

I have this code Code:

varDate = Date()
SQL="SELECT id,name,eventtype,location,fromdate,todate FROM events WHERE publish='1' and fromDate > "& varDate &" ORDER BY fromdate asc"

fromDate is a Date/Time field in access. What i want to do is pick out any data which has a fromDate which is greater than today but the sql command isnt picking out any data. does anyone know how i could change my script to work.

View Replies View Related

Comparing Tables In Access

I have a two tables in my database with a username column in both of them, i am trying to build an SQL query to return only the usernames that are not listed in both of the tables.
Any ideas?

View Replies View Related

Comparing A RecordSet With An Array?

Here's my goal: 1) to set up a 7 column table containing a list of 147 numbers from a recordset (StNumberRS) and 2) to compare those numbers to a separate recordset containing a partial list of those numbers (completedStores).

If one of the numbers in the completedStores list matches a number on the StNumberRS list show the 'icon_yes.gif' image, otherwise show the 'icon_no.gif'.

I can loop through the StNumberRS and set up the 7 column table, but I'm stuck trying to loop through the completedStores list while inside the StNumberRS loop. Could someone look through my code and see where I've gone wrong? Code:

View Replies View Related

Comparing Recordset Values

i have a a SQL stored SP bringing out one recordset, I have a loop reading out all the records, what I would like to do it compare each record to the previous one and if it is the same then do something. I'm having trouble figuring out how to do the comparison as I loop through the records

View Replies View Related

Comparing Two Record Sets

how can i compare 2 record sets. In one RS i have excel file and other RS i have SQL server and when i get the results from both i want to compare them as one of you guys suggested me to write a loop that cycles through the record sets Comparing any fields.

View Replies View Related

Comparing A Number To A Set Of Numbers

I am facing a situation I dont know how to solve... at least with a good server response for 400.000 users.

Maybe someone may help:

We have a B2B with a list of thousands of products listed. Users can select the products they like in order to contact the seller later on from a "cart of products/contacts".
Selected products are stored in a session variable.

What I want is: How to remove the check button of each product that has already been selected, and instead of that, show something like "selected" or similar.

The problem I am facing is to compare each product ID against the session with all selected products. This comparison for every line/product could harm the response of the server with the high number of users we have. how would you do this comparison?

View Replies View Related

Comparing One Array Against Another For Differences.

Is there an easy way to compare the data in one array against another and output all values that are not contained in both arrays. I basically have two lot lists that should be matched (in value, not necessarily in order) but occasionaly one or two lots will be missing in one or the other array.

I need to be able to know when the two arrays are not matched and which array of the two is missing the lot. This just seems like a pretty common thing to do, so I'm sure there is already a script out there to do it. I'm new to working with arrays and don't want to reinvent the wheel for this.

View Replies View Related

Comparing Dates From 5 Different Table

I am trying to create an asp page that prints out upcoming events from 5 different databases(access 2002) and displays them in the order by date. They needed to be sorted by date. I want the results to show only for the next 30 days (events coming in next 30 days, I have already completed that part by using sql, please check code for refference)

Now I need to sort them out so i can see them by date not by the order of database. I used 2 databse in my first test asp page (please see codes) and used if-then and while-loop. Someonel told me to use union and do it by sql query etc... I will be greatly greatly greatly thankful to someone who can help me out in my coding. Please see my code and let me know: Code:

View Replies View Related

Comparing Data Between Two Tables

I have two tables. Table1 contains the names of training classes being offered and Table2 has the names of the people who are going to attend. The code below lists the classes being offered and a links to add, remove, and view other employees that are attending that class.

I only want the remove button to appear if you have already signed up for the class. I also only want the remove button to appear if the username cookie equals the username of the person that is signed up for the class which means the employee that wants to be removed from the class has to do it. My insert code (not shown) puts the username in the cookie into the Table2.

I tried using this code to accomplish what I wanted above but it does not display the remove button if the person is signed up and trying to remove themself. Code:

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved