"advanced" Order By
i am making a forum, im the database i have a row called 'TopicLastPostDate' and 'TopicCreated'. 'TopicLastPostDate' only adds the now() value when someone posts a message, and i can't put the 'TopicCreated' there as well when im posting the topic as it checks if 'TopicLastPostDate' got any data to then add a data of last post in the topic list. can i use ORDER BY on 2 different rows? (both 'TopicLastPostDate' and 'TopicCreated'),
View Replies
ADVERTISEMENT
my company is in need of a shoppingcart that has adavanced inventory management in the admin, i.e. calculates 'cost of goods sold' in reports and FIFO etc. Anyone know of any?
View Replies
View Related
Is there any resources (code, samples, snippets, methods etc) anyone knows of creating an advanced search in ASP linked to a microsoft Access 2000 database?
I basically want to query a database from attributes stored, e.g male, height etc using radio buttons and a text input form.Im using Dreamweaver MX and a DSN.
View Replies
View Related
I already have the code which does simple paging [First] [Prev] [Next] [Last] . how to achieve the [...] feature?? That is if there are 1000 pages, I don't want to display the page link for all the 1000 links in one go. I want only the first 10 page links to be shown on one page then display [...] for the user to click and see the next 10 page links.
I have been searching for this feature for a long time but most of them talks about the simple paging only. Useful links and complete source codes.
View Replies
View Related
I have had a project on my plate for months with noone who knew CDONTS enough to help. I do not believe there is anyone better to ask than you. Here's my problem. I use CDONTS on 2-2k servers with the basic SMTP server included with IIS. Because of the corporate firewall I am unable to use this method to send email to an external email account.
What I need to do it use CDO 1.2 and attach to an outlook application on the server which has access outside our network. My problem is every tutorial I find seems to be wrong and noone seems to know how to make this happen.
View Replies
View Related
Advanced DHTML Dropdown List component (Javascript,ASP,.NET,PHP)
enhances usability of large dropdown lists with type & select feature.
It suggests possible matches for entries you type in the input box.
View Replies
View Related
I'm trying to create a search on my asp form that will ingnore spaces, and, or and replace them with % for a wild card search. now if they type in the box Go Home it will only find Go Home. Right now I'm just trying to get it to take that Go Home and put it in Go%home.This is what I'm using for this field.
pcat = GetParam("category")
if not isEmpty(pcat) then
if not (sWhere = "") then sWhere = sWhere & " and "
HasParam = true
sWhere = sWhere & "e.category like '%" & replace(pcat, "'", "''") & "%'"
end if
Everything i've tried doesn't seam to work.
View Replies
View Related
I need some help with creating an MS Access table using ASP. I'm familiar with "standard" SQL statements, and also with the ASP methodology/syntax for creating a simple MS Access table. However, the table I need to create is a bit complicated, because:
The primary key is a FORMATTED auto number (i.e., if I were to define this field directly in MS Access' "Table Design View", I would put "Acme-"000 in the FORMAT field to create an autonumber that automatically generated a series like Acme-001, Acme-002, Acme-003, etc.)
The first part of this formatted autonumber is a variable. So, with this in mind, how do I write an ASP statement to create a table that has an autonumber field as a PRIMARY KEY, formatted per the above?
View Replies
View Related
URLURLI need help writiing an advanced conditional statement.I want to display an image if two recordset values = 1 or other various number combinations.
This statement works with one, how could I edit this statement to include two recordsets values? Say I want to add another feild say "recent" to this statement and it has a value of 2
Code:
<% if Recordset1.Fields.Item("progress").Value = 1 then ' Adv Conditional Region %>
<% end if ' Recordset1.Fields.Item("progress").Value = 1 %>
View Replies
View Related
What I want to do, is in my admin page, where I have all the users details, I want to be able to see when they last logged in, how many times they've logged in, and which user's are currently online? Just so that it can be used for reference, and also as a sort of extra security.
Also, is there any way that I can make the login more secure? At the moment, it only uses Sessions, is there anything else I could do to make it more secure?
View Replies
View Related
May I boldy suggest that a new advanced ASP forum is created (ideally within the "Advanced Development Center", but otherwise as a sub-forum of this forum) for ASP questions and discussions which are more challenging/complicated than the norm? Code:
View Replies
View Related
Imagine you have a databse memo object with the description of a town.
Imagine if you wanted a peaceful town, you might type "peaceful" in a text
box and then click submit, the query run will be:
WHERE towndesc LIKE '*" & Text32 & "*'
Now imagine if they type "peaceful trees"
How do you get it to automatically check:
WHERE towndesc LIKE '*peaceful*' AND towndesc LIKE '*trees*'
Because it can have one description or the user can enter 5.
Or maybe you want the user to be able to enter key words like AND OR
and use them within the query.
View Replies
View Related
I am trying to debug an issue with sessions in my ASP 3.0 web
application, which runs fine on WIN2K Pro and WINXP Pro, yet fails to
function correctly on WIN2K Advanced Server.
My actual application is using sessions to store username, and security
level (permissions) for my application. The default.asp page is the login,
where these values are set. I have triple and quadruple checked my IIS
Settings to make sure "Enable Session State" is checked, and the
session.timeout is set to 120.
Now if I remove my application, recreate it
in IIS admin, stop and start the IIS services, and run my application, the
session variables seem to be saved across the first redirect to my
main_menu.asp page. Here I have several menu choices, which are dependent
on the session("seclevel") to determine which they can or cannot access.
Here is where it seems my session vars are lost, since when I click on any
choice, I get redirected to the log_out.asp page, which abandons the session
and returns the user to the login (default.asp) page. Code:
View Replies
View Related
if there is a way to validate email addresses further. For example I just received an email from this person:-
cvx@fcxgf.fgfd
Obviously some fool trying to f**k with my form and send me a test email.
Because an array of countries have different extentions, can I not somehow validate for that?
I guess my validation is picking up on the @ symbol and the fact that some chars are needed before and after the @ symbol and a dot exists. But can we validate this further to prevent me getting this kind of email?
View Replies
View Related
Can anybody point me to a good tutorial/manual on advanced server-side form validation including validation of fields against unwanted strings such as the use of "http://".
View Replies
View Related
I have a code looking like this, but i can't seem to get it to work:
strSQL = "SELECT * FROM files WHERE Subject = 1 ORDER BY ID DESC"
What am i doing wrong?
View Replies
View Related
This is a follow up to a question I asked two weeks ago which I thought was solved but on further inspection I realised it wasn't working fully. I have an ORDER BY on my search results page, the search uses two dropdown menus, the first one is start character (A-Z), and the other is grade.
The problem I have is that the ORDER BY work perfectly when I leave the start character dropdown blank, and when I use the grade selection dropdown, but when I select a start character I get this error message:
Microsoft JET Database Engine error '80040e14'
Characters found after end of SQL statement.
/html/advanced_comic_search.asp, line 56
Can any one shed any light on this for me?
View Replies
View Related
I have records which I want to display a certain way, i.e. the records are in the database like this:
24TR
9L
133JF
But I want to display them as:
9L
133JF
24TR
Is it possible?
View Replies
View Related
I am using an sql inner join like below:
strSQL = "SELECT * FROM tblPage INNER JOIN tblNews ON tblNews.NewsID=tblPage.pageID ORDER BY newsDate DESC"
However this orders both by newsDate which causes problems with the ordering of the page, As I want the page not to be ordered just the news item.
View Replies
View Related
An ASP page outputs data from the query
"Select ThisAndThat from comments WHERE pageURL='" & pageURL & "' ORDER BY
threadID, datesent"
(Access mdb)
threadID is a string (OK, I know!), which means that 103 displays before 99.
Is there a way to write the SQL query to order them numerically? This would
be much easier for me than changing the data type and hunting down every
page that INSERTS or UPDATES the db.
View Replies
View Related
I am extremely confused about how i should go about doing this:
I have puled out current orders and have displayed in a table .These orders have their own order numbers.
Once the person clicks on first order,the order is displayed in a form,where the user can edit the order details and hit submit.
Now when he hits submit ,I want his to go the previous page where the orders are displayed in table ,so that he can click on the next order and process it/OR may be whent he user hits submit ,i want the next order directly to be displayed in the form.
View Replies
View Related
I have a table in my database with several numbers.(2, 5, 8, 0, 9, 0).Now i retrieve the numbers to my page using "order by numbers", and my page look like this.
0
0
2
5
8
9
I want the lowest number to be first, but if the number is 0 (zero) I want it to go to the bottom.Can that be done
View Replies
View Related
At the moment I have:
SQL = "SELECT sample.* FROM sample WHERE (id = " & teamid & ") ORDER by pos"
Which orders my players like:
ATT
DEF
GK
MID
in alphabetical order.
Is there anyway to specify this order so that it still orders the players by "pos"(position) but in this order:
GK
DEF
MID
ATT
View Replies
View Related
i want to order by NUMBERS:
BUS n 1
bus n 2
ect.
bus n 10 bus n 11
But the order goes like this:
bus n 1
bus n 10
bus n 11
bus n 2
how can i get right order:
bus n 1
bus n 2
bus n 10
bus n 11 ....
View Replies
View Related
I am performing a basic sql query. select * from tablename order by featured asc, id asc
BUT...I want all those listings with FEATURED as a Y to show up first.
All other listings should show up afterwards.
How do I do this? I may be thinking too hard about it.
View Replies
View Related
I have one table wich has a unique ID feild for each record and other feilds, and another table that has one field that is a number that contains the an ID from the other table and another field that contains some text.
I want to open with sql the first table, but order its records alphabetically by the text in the second table. is it possible? Code:
View Replies
View Related
I have used ASP for years using MS Access and have used MSSQL quite a lot as
well. I have never came across something like this before.
MSSQL table names and types:
ProductName nvarchar
ShortDescription nText
ThumbNail nvarchar
etc
When I have the recordset in the order as follows, all works well:
(Recordset2.Fields.Item("ProductName").Value)
(Recordset2.Fields.Item("ShortDescription").Value)
(Recordset2.Fields.Item("Thumbnail").Value)
Though if I have the Thumbnail first the description does'nt show.
View Replies
View Related
I've got a site with PayPal and Google Checkout payment options. The checkout page formats two HTML forms, containing bespoke cart code - one posts to PayPal, the other to Google Checkout.When an order is placed, it needs to be updated back on my site, so that the order is marked as 'paid' in the database. When this is done with PayPal, I just provide a hidden field in the form called 'invoice' containing my id number for that transaction. This is returned in my IPN, and I update the database accordingly. However, I can't find a similar field in Google. Their example code all seems to be in XML and is WAAAAAAAAY more complicated than I need it to be. I just need to send a value with my cart code to Google Checkout, and have that value returned after the transaction has completed.
I've set up Google Callback, and the page is being called and the order is being written to my google log txt file, I just need this to contain my order id number for the transaction so I can just add the logic to update the database based on this id number.
View Replies
View Related
Does anyone know how to organise data in alphabetical order when using a select statement???
When i use mine, i have been using ASC and it justs put the newest record added!
View Replies
View Related
I've written the following piece of code which is embedded in HTML. For some reason when the script is processed the last response.write statment is displayed before the information in the while loop. I can't seem to figure out why this is happenming.
Any ideas? Code:
View Replies
View Related
I'm working on a list of members.In my db I have two columns lastName and marriedName
lastName is the member name before they got married and legLastName is their lastname after they got married.
Now I need to display theese two columns in alphabetical order in one list.
If I for example have theese members:
lastName, marriedName
Anderson, Johnson
Petersson, Svensson
Nilsson, Persson
Lindgren, Johnson
I want this result:
Anderson
Johnson (look for Andersson)
Johnson(look for Lindgren)
Nilsson
Persson(look for Nilsson)
Petersson
Svensson(look for Petersson)
View Replies
View Related
I am processing the variables from a form submission with a for/next loop. The problem is that the order of the variables are NOT written IN ORDER.
Form field 1 prints fine but then it jumps to Form field 9 and then back to Form field 4 then to Form field 2, etc. IS there a way to process the form variables in a loop in ORDER? field 1, field 2, field 3, etc? Code:
View Replies
View Related
I have a form that is created dynamically, and all is working fine. But I want users to add an sort order to help list phrases in a certain order.
<input type="text" name="AdvantSort" value="" size=1>
<input type="checkbox" name="Advantages" value="10">
Phrase1
<input type="text" name="AdvantSort" value="" size=1>
<input type="checkbox" name="Advantages" value="20">
Phrase2
so on, so forth...
And one clicks on the form, and a SQL statement is executed.
However, when I create the SQL statement,
INSERT INTO table1
(FormId,AdvantageId,SortOrder)
VALUES (<call from form ID>,<advantages>,<advantsort>)
Then it loops to allow the next phrase to be entered. The statement also takes the value from every other sort order value including that ones that are in different lines. Which in result, gives me an error, saying the insert columns exceed that of the available columns in the table.
View Replies
View Related