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

exclude 1st record

Thread began 11/09/2018 11:17 am by Jamie | Last modified 11/15/2018 8:48 am by Ray Borduin | 101 views | 5 replies |

Jamie

exclude 1st record

Hey Ray

With this recordset

<?php
$Events = new WA_MySQLi_RS("Events",$DBConnection,4);
$Events->setQuery("SELECT * FROM events WHERE Live = 1 ORDER BY EventDate ASC");
$Events->execute();
?>



in the results, how would I exclude the most recent record based on the date column EventDate?

Sign in to reply to this post

Ray BorduinWebAssist

I have updated the rsobj.php file to support this more easily. Just update the first line manually to:

$Events = new WA_MySQLi_RS("Events",$DBConnection,4,1);



I have attached the updated rsobj.php file. (make sure to update the CrossSiteProtect attribute if you have turned it off in your file)

Attached Files
rsobj.php
Sign in to reply to this post

Jamie

thanks Ray however replacing that first line of the recordset stops any records from being shown.

***********update************ I swtiched it round from 4,1 to 1,4 and that seems to have made it work

Sign in to reply to this post

Ray BorduinWebAssist

Maybe for now it is best to update it in your SQL directly and put in:

LIMIT 1,4

at the end of your SQL statement manually... I'm probably going to change the order in a future build, I'm not sure I need to think about this some more, but I wouldn't want you to have to go in and update the page if the rsobj.php file gets updated to use the other order.

Sign in to reply to this post

Jamie

ok many thanks

And just to let you know that the updated rsobj file 'broke' the search element that we discussed the other day - it was back to showing 'you searched' on every results page. reverted back to my 'original' file and it was fixed. have attached my original rsobj 2.2 for you here

Sign in to reply to this post

Ray BorduinWebAssist

Please add FTP information and a url where I can view the 'you searched' message in the private area. I'd like to take a look at it. Also include steps to reproduce with any usernames or passwords I might need.

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...