close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Problems with the sort function

Thread began 9/05/2012 4:37 am by Noa2086 | Last modified 9/07/2012 11:14 am by Noa2086 | 918 views | 2 replies |

Noa2086

Problems with the sort function

Hi,

i would like to sort my records by date. in europe we have this format: dd/mm/yyyy.

the situation is: it starts with day, then month, then year. i would like to start with year, then month, then day. All DESC.

why does my validation for spry not work?

thx for your quick help!

Sign in to reply to this post

Willi Schneider

For your first problem:

What's the column type for the date entries?

I guess you have set it to "varchar" or something like that.

You should set it to "date" and insert the values like "yyyy-mm-dd".
In your portfolio page (=results table) you have to convert the date form "yyyy-mm-dd" to display like "dd.mm.yyyy".

You can do this in the bindings panel in dreamweaver --> select the date column and change the date format to "MySQL Date/Time: 30.12.2002"
There's a free dreamweaver extension at document.php?id_doc=51 which can do all the needed conversions.

Then you sort your recordset according to your wishes.

Your second problem:

the page shows a javascript error:

Meldung: 'Spry' ist undefiniert
Zeile: 291
Zeichen: 5
Code: 0
URI: kontakt.php?invalid=true



So maybe, that's the reason for the validation to fail. Just a guess however.

Sign in to reply to this post

Noa2086

thx willi for your answer!

i changed it to date.
i have cs6 and can't see any format button in the bindings panel.

the validation tooltips for spry thing: i builded it up from zero. now its working. very annoying.

how can i set a default value to input files? is there a smart way to style it?

my datepicker does not work. any ideas? i have a custom theme with jquery.

files included:

2 jquery and 1 css

thx for your help!

Sign in to reply to this post

Noa2086

my solution to format from yyyy-mm-dd to dd-mm-yyyy:
if the record is empty => show "no data"

<?php if ($row_Services['Datum'] != "") {
$originalDate = $row_Services['Datum'];
$newDate = date("d.m.Y", strtotime($originalDate));
echo $newDate;
} else { echo 'Kein Eintrag'; } ?>

=> "Services" is my recordset
=> "Datum" is my field name
=> "Kein Eintrag" is german and means no data.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...