Data ordering question

hello all, basicaly, im trying 2 order a query with the 'order by' statement in sql (Access) and then output it into a table. what im doing is: the table is queried, and outputted to an html table. then the column headers contain a hyperlink that sets the querystring to a value for ordering. im not sure what the problem is, but i guess i dont know how to structure everything so that the querystring is evaluated and orders the sql code. like if you could tell me how to setup the table, links, and query that would be nice. Thanks!

<!--- of is the order field --->
<cfif #of# eq "">
<!---there is no orderfield--->
<cfquery name="qCustomers" datasource="customers">
select id,[first name] as firstname, company, [last name] as lastname,[job title] as jobtitle, [Business Phone] as businessphone, [Fax Number] as faxnumber, Address, City, [state/province] as stateprovince,[Zip/Postal Code] as zippostal, [country/region]as countryregion, [web page] as webpage 
from Customers 
</cfquery>
<cfelse>
<!---there is an orderfield--->
 <cfif #of# eq "lastname">
 <cfset of="[last name]">
 </cfif>
 <cfif #of# eq "firstname">
 <cfset of="[first name]">  
</cfif> 
<cfif #of# eq "jobtitle">
 <cfset of="[job title]">  
</cfif>  
<cfquery name="qCustomers" datasource="customers">
 select id,[first name] as firstname, company, [last name] as lastname,[job title] as jobtitle, [Business Phone] as businessphone, [Fax Number] as faxnumber, Address, City, [state/province] as stateprovince,[Zip/Postal Code] as zippostal, [country/region] as countryregion, [web page] as webpage  
from Customers  
order by #of# 
</cfquery>
 </cfif>

Similar Messages

  • Printing and exporting iCal events in date order

    I would love to be able to print out my gigs and events in date order so that I can give this list to the people in my band and my agents. 
    iCal does not do this and there are lots of people asking a similar question.  I don't know enough about programming to alter the scripts, and I love having my dates synced across all my toys, but is there another app or facility that will give me the same functionality of iCal with the print-in-date-order option?

    possibly could try calprint app??
    it is useful to have all the calendar events across all devices now, don't even use a paper diary now

  • The DATA CAP MEGA THREAD....post data cap questions or comments here.

    In the interest of keeping things orderly....This is the DATA CAP MEGA THREAD....post data cap questions or comments here.
    Please keep it civil.
    Comcast is testing usage plans (AKA "data caps") in certain markets.
    The markets that are currently testing usage plans are:
    Nashville, Tennessee market: 300 GB per month and additional gigabytes in increments/blocks ( e.g., $10.00 per 50 GB ). 
    Tucson, Arizona market: Economy Plus through Performance tiers receive 300 GB. Those customers subscribed to the Blast! Internet tier receive 350 GB; Extreme 50 customers receive 450 GB; Extreme 105 customers receive 600 GB. Additional gigabytes in increments/blocks of 50 GB for $10.00 each in the event the customer exceeds their included data amount. 
    Huntsville and Mobile, Alabama; Atlanta, Augusta and Savannah, Georgia; Central Kentucky; Maine; Jackson, Mississippi; Knoxville and Memphis, Tennessee and Charleston, South Carolina: 300 GB per month and additional gigabytes in increments/blocks ( e.g., $10.00 per 50 GB ) Economy Plus customers have the option of enrolling in the Flexible-Data plan.
    Fresno, California, Economy Plus customers also have the option of enrolling in the Flexible-Data plan.
    - If you live outside of these markets you ARE NOT currently subject to a data plan.
    - Comcast DOES NOT THROTTLE your speed if you exceed your usage limits.
    - You can check out the Data Usage Plan FAQ for more information.
     

    I just got a call today that I reached my 300GB limit for the month.  I called and got a pretty rude response from the security and data usage department.  The guy told me in so many words that if I do not like or agree with the policy that I should feel free to find another service provider.!!! I tried to explain that we watch Netflix and XFinity on-demand alot and I was told that that can not be anywhere close to the data usage. I checked my router and watching a "super HD, dolby 5.1" TV show on Netflix will average about 5-6 GB per hour (1.6MB/s) ... sp this means that I can only watch no more than 1-2 Super HD TV shows a day via Netflix before I run out of my data usage.    This seems a bit redicilous doesn't it? Maybe the TV ads about the higher speed than the competition should be accompanied with "as long as you don't use it too often"   Not a good experience ... 

  • NSStream data order?

    Hello,
    I'm writing a server-client application. On the server side, I use low-level BSD-sockets and on the client side, I use NSStream. The server sends data in a loop as follows: int1, int2, ... intk, char( intk ).
    In the last two steps I send a file: first it's size and then the file. I use TCP connection on server side. Everything works fine for about 30-40 secs, but then the client throws an error. I debugged for the error and it turned out that the integers aren't always recieved in the order they were sent by the server. For example the server sends: 34, 58, 42, 230, char( 230 ) and the client receives 34, 42, 230, 58, char( 58 ). The error occurs in the last step, where the client expects a file with size of 58 instead of 230. My question is: NSStream cannot guarantee that the data is received in the order they were sent?
    Thanks,
    Pete
    Message was edited by: Peter Becker

    Peter Becker wrote:
    I send them like this from Windows:
    result = send( ClientSocket, ( const char * ) &int1, sizeof( int ), 0 );
    I don't make any conversion, I think it is handled automatically.
    It isn't.
    Why do you think the byte order is relevant for the data order issue?
    Because what you describe really sounds like a byte order issue.
    I got my ints correctly, the numbers I receive are the same that I send. They just don't come in the right order. Is this a wrong approach to pair a regular low-level TCP server with a high-level NSStream client?
    (FYI: I moved on to use CFSocket instead of NSStream and it works fine. My problem is solved, but I'm still courious what the problem could be with NSStream.)
    NSStream isn't very hight level at all. It is just an Objective-C wrapper around file descriptors and select. There is no problem with NSStream. If you posted more code, it might be possible to see where the error lies.
    The code that you have posted is wrong. You should always convert integers to network byte order before sending. Otherwise, your program will fail on a PPC machine regardless of whether you use CFSocket or NSStream.
    I understand what you are saying about the ints being correct, but in the wrong order. That, by itself, doesn't sound like a byte order issue, but there is no way to tell for certain. If you switch from one API to another and it starts working, it doesn't mean there is some problem with a 20-year old API like NSStream, it means there is a problem with your 2-week old code.

  • Photos. They are on my macBook, backed up on time machine. Copied them (hours and hours) to external hard drive. They are now in alphabetical order (19,000  of them) NOT IN THEIR EVENTS or date order-and have been taken with different cameras- help!!!!!!

    Photos.
    They are on my macBook, backed up on time machine. There are 19,000+ of them, some rescued from a pc crash- which I used the nifty iPhoto to put back into date order.    
    I want to take them all off my laptop, now............as I need to use it for WORK!!
    Copied them (hours and hours) to another external hard drive.
    They are now in alphabetical order (all 19,000+ of them) NOT IN THEIR EVENTS or date order. (-They have also been taken with different cameras over the years and some of the generic camera numbering remains.)
    I have tried to copy them (only a few as an experiment)  one event at a time, but that again "opens up" the Event "folder" and tips them out as individuals and therefore just lists image letters and numbers alphabetically.
    How can I copy
    the whole library still in  "Events" to an external hard drive?
    the folders/albums I have already made on to this hard drive?
    and how can I add to this back up monthly, again keeping events and folders separate and updated?
    Mac is so user friendly - there must be a way.........
    Thanks

    UPDATE : I have re-installed from disk, various apps that were no longer functioning such as iLife, iWork etc. So, I now can access my photos again.
    Also, I had to re-install all the software for my printer ( Stylus Pro 4880 ) and reset it so the printer is working again.
    Photoshop CS4 won't open. I think I will have to get in touch with Adobe as basically, I guess they have a built-in "blocker" which prevents me from opening the app as the license is for only 1 user and having re-installed the OS, there are now, in effect, 2 users ( Me and Me 1, I think ).
    So, having added on a new external HD, Time Machine has made a copy of most of the files, folders, apps etc onto the external HD. The internal HD is still nearly full ( 220 GBs out of 232 GBs ).
    I am guessing the way to go now in order to free up space on the internal HD is to delete/trash older photos from my iPhoto library and hope that if needed, I will be able to access them on the external HD.
    Am I correct ? Please advise before I do something I will regret.
    Thanks, Sean.

  • Apple TV (1st gen) photos in an Event not in date order

    I have synced selected Events from iPhoto to my Apple TV 1st gen with iTunes 11.0.1
    The events synced are "merged" events from 2 cameras on a month-by-month basis.
    In iPhoto, I have the event sorted by date, but on the Apple TV, the photos are NOT in date order.
    How can I get the Apple TV to reflect the choice I make in iPhoto ??

    Thanks Winston
    DIT-DIT-DIT-DAH

  • In the last 36 hours my photos have jumbled within various albums. Random photos have attached at the end of an unrelated album, old photos have appeared again on Recently Added, some photos are missing but still on "collections". No date order

    Within the last 36 hours my photo albums have turned into a real jumbled mess. Random photos have appeared at the bottom of my Recently Added album. In most cases it's a copy of a photo that was taken months or years ago so now it appears twice.. 200 random photos have appeared in an unrelated album.  Some photos are missing completely. The date order is correct in some places and then it goes back and forth over the months and years. The "collections" appears to be okay.  This morning when I went into the photo app About 50 photos that were permanently deleted 3 months ago reappeared on the Recently Added Album which  I deleted again.  if  I delete these irreplaceable photos from the unwanted album it will delete the photo completely. Help please - this is so annoying and frustrating. I hate to think when I turn the iPad on tmoor row what else will have changed .

    Quick Update:
    I usually have my Mac laptop up with Messages running on it.  As you know, it will receive the same messages you send/receive on your iPhone.  I thought all my old photos would be there too, but they have all disappeared as well except for the last few.
    Messages is supposed to archive all old photos to  a directory called ~/Library/Messages/Attachments.  On my mac, this was a 0 byte file that was created back in Jan 2014.  As a result, none of the old photos got saved on my Messages app either.  I looked at a Time Machine Backup and it has been the case since September (no earlier backups available).  So, it's unclear how long this issue has been going on for my Messages app and how related it is to my iPhone problem.
    In any case, if any of you use Messages, you may be able to recover your photos in that directory provided it didn't get trashed like mine did.  I moved the file and created a new Attachments directory.  Upon relaunch, Messages started properly storing new photos in there again.
    Either there was a really terrible bug in the Apple software or something malicious has happened.
    P.S.  I'm running OS 10.9.5 Mavericks.   There is a thread of people with this problem on Yosemite here:
    No pictures are shown in Message om Mac
    This seems like a pretty seriously terrible bug.  I will be talking again to AppleCare on Wednesday and I hope they can escalate this.

  • Dunning Letters- Invoice Date Order

    Hi all,
    When running Dunning the invoices are shown NOT in date order ie oldest invoice first in the list and then going through in date order to the latest at the bottom. Is it possible to have the oldest invoice at the top down and going down to the latest invoice at the bottom?
    Thank you,
    MB

    Hi,
    Yes you would think that but in fact the dates are all mixed up ie 11.09.10 then 11.08.10 then 08.11.10 etc
    Strange but true!
    Any ideas?
    MB

  • While trying to open the order in co03 or co02, It is not opening and showing the error message as "Inconsistent data : order 107434 16.09.2013, duplicate entry o 0020. is showing ?

    Hi,
    While trying to open the order in co03, co02, I am getting the below error message : Inconsistent data : order 107434 16.09.2013, duplicate entry o 0020 is showing. Please guide me the way forward.
    Regards,
    Mastan.

    Hi Mastan
    The report mentioned by Rajen should clear the inconsistent records.
    Please observe that you could have found this by yourself report with a quick note search for this error message or even searching for old threads.
    Even a google search points to the solution.
    You should do your own research before opening such kind of thread.
    BR
    Caetano

  • I recently synced some old photos onto my ipod touch and they briefly appeared on google maps in geographical/time date order. Couldnt bring it back up after Id logged out. id like to be able to do it again, any suggestions?

    I recently synced some old photos onto my ipod touch and they briefly appeared on google maps in geographical/time date order. Couldnt bring it back up after Id logged out. id like to be able to do it again, any suggestions?

    Have you tried the following document, kohida?
    [What to do when Windows displays a blue screen error message or restarts when syncing the iPhone or iPod touch|http://support.apple.com/kb/TS1502]

  • Is there a way to organise albums in date order

    In iphoto I could just scroll down my events and come to a date. I have a multitude of albums exported from iphoto into photos, but they are in random orders and I wanted to dispay them in date order, without having to manually dragging the album into place. Is this possible??

    No but see reply by léonie and her suggestion to make a suggestion to Apple as well
    in the new app Photo, faces are in no particular order that i can see. can faces be re-ordered or sorted?

  • In Notes: how to reverse date order so most recent entry appears at top of list

    MacBook Pro late 2008, OS 10.9.4, processor 2.4 GHz, memory 2 GB
    Need to reverse the date order of entries in Notes, moving the most recent date to top of the list.
    Can anyone help
    Thanks:)

    Hi Julian,
    Table before sorting:
    Date
    Detail
    Transaction
    Balance
    8 Jan 2012
    a
    -100
    whatever
    7 Jan 2012
    b
    -24
    whatever
    6 Jan 2012
    c
    -33
    whatever
    5 Jan 2012
    d
    -450
    whatever
    4 Jan 2012
    e
    -115
    whatever
    3 Jan 2012
    Salary
    4999
    whatever
    I wish
    2 Jan 2012
    f
    -457
    whatever
    1 Jan 2012
    g
    -10
    whatever
    I haven't bothered with the balance, because you will recalculate after sorting.
    Here is the table after sorting Entire Table and **then** entering formulas:
    Date
    Detail
    Transaction
    Balance
    1 Jan 2012
    g
    -10
    1500
    2 Jan 2012
    f
    -457
    1043
    3 Jan 2012
    Salary
    4999
    6042
    I wish
    4 Jan 2012
    e
    -115
    5927
    5 Jan 2012
    d
    -450
    5477
    6 Jan 2012
    c
    -33
    5444
    7 Jan 2012
    b
    -24
    5420
    8 Jan 2012
    a
    -100
    5320
    Balance is Column E in this example.
    E1 is opening balance (check with closing balance from previous month).
    In Row 2, the formulas begin. In Cell E2, type this:
    =E2+D3
    Then Fill Down.
    Regards,
    Ian.
    P.S.  No. that is wrong. I missed the transaction on 1 January. Must go to bed (12:45 am here).

  • I just upgraded to iPhoto 11. My events are not sorted in date order even though I have chose it to under the view tab????

    I cannot get my photos in date order in iPhoto 11 What can I do to remedie this?

    The ! turns up when iPhoto loses the connection between the thumbnail in the iPhoto Window and the file it represents.
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • Has anyone had a photo syncing problem sine the last iOS or iTunes update wher the sort order has been changed back to date order, when before the update you photos were synced in file name order??

    Syncing from pc to iPhoto imbedded in iPad... I spent hundreds of hours naming jpeg files/pics, and they were ordered properly ((per my naming, like 0001 bla bla.jpeg, 0002 blah blah.jpeg, etc.... They were syncing perfectly in order, until last SW update... Now, still in right order on pc, but last sync scrambled them all back to date order on iPad after sync... Any ideas?

    Thanks for your response. I thought there was something I wasn't doing right or something I was missing.
    Aperture and Mobileme syncing is really "hit or miss", unpredictable. Especially after a manual arrangement of the order of photos within an album. And selection of the "key photo" is also hit or miss. Sometimes it sticks. Sometimes it doesn't. Sometimes it sticks for a bit and then reverts back to the 1st photo of the album.
    It's ironic that one of Apple's motto is "it just works"! In this case, it really doesn't work!

  • Is it possible to put all my pictures in strick date order?

    How do I put all my pictures in strict date order?

    Select Photos under Library, go to the View manu, select Sort Photos then By Date and if you want to sort them in Descending or Ascending order.

Maybe you are looking for