Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 10th, 2025, 5:43 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Order records
PostPosted: May 19th, 2006, 7:38 am 
Offline

Joined: April 1st, 2005, 6:59 pm
Posts: 98
Location: Maastricht, The Netherlands
Opus: V7
OS: Mac OS X 10.7.2 | Windows 8 Dev
System: i5 2.7 | 8G Ram | 1 T HD
Hi,

Trying to order records ascending in script ( see code below ).

Code:
var db = new Database("FILEDSN=kast.dsn");
var records = null;

//////////////////////////////////////////////////////////////////////////////
//
// NOTE: Start_Record_Num is the record number for the first of the 5 records
//       and it is a Page Variable
//

function SearchDBp()
{
   var sql = "SELECT * FROM paneel WHERE merk LIKE '%"+merk+"%' ORDER BY positie ASC ;";
   // Debug.trace(sql+"\n");
   records = db.ExecuteSQL(sql);
   
   ShowRecordsp()
}
function ShowRecordsp()
{
   if (records == null) {
      return;  // need to call Search First to get records
   }
      tel1=records.GetNumberOfRecords();
var num_records1 = records.GetNumberOfRecords();
   if (num_records1 > Start_Record_Num) {
      // Jump to record that will be the first to be shown
      records.GetRecordAt(Start_Record_Num);
   }
   // Get first five records
   for (num=1; num<=7; num++)


The "ORDER BY positie ASC" does not do the job!!!

Is there another way to do this are is there a limit???

Cheers

Ronnie Dackus


Top
 Profile Visit website  
 
 Post subject: Last record is placed first
PostPosted: May 19th, 2006, 8:37 am 
Offline

Joined: April 1st, 2005, 6:59 pm
Posts: 98
Location: Maastricht, The Netherlands
Opus: V7
OS: Mac OS X 10.7.2 | Windows 8 Dev
System: i5 2.7 | 8G Ram | 1 T HD
Hi,

Just saw that the last record is placed first, other records ascending.


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 77 guests


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group