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

please can you help (simple code)

Thread began 1/01/2022 6:33 pm by yogastudents362523 | Last modified 1/03/2022 10:31 pm by yogastudents362523 | 15 views | 9 replies


please can you help (simple code)


I had been very much relying on re-using some old code from my previous project, but things have changed massively.
Here is the MySQL query code as built by DataAssist MySQLi extension.
The "Test" button in the extension says the query is valid. I am selecting all classes for the current month plus 4 ahead.

Since I am not sure if the issue is in my Select query or in the PHP, it is difficult to know what to do next.

$mySaturdayClasses = new WA_MySQLi_RS("mySaturdayClasses",$mysqli_workshops,1);
$mySaturdayClasses->setQuery("SELECT * FROM workshops.saturdayssundays WHERE (saturdayssundays.classdate BETWEEN (DATE_ADD(CURDATE(), INTERVAL 0 MONTH)) AND (DATE_ADD(CURDATE(), INTERVAL 5 MONTH))) AND (WEEKDAY(saturdayssundays.classdate)=5) ORDER BY saturdayssundays.classdate");

Then I try to create a simple while loop to print out the data. I gave up using the object approach when I couldn't get that to work. But this procedural approach is also not working.

while ($row = mysqli_fetch_array($mySaturdayClasses)) {
echo date('F', strtotime($row["classdate"])) ;
echo date('j', strtotime($row["classdate"])) ;

The last time I did all this PHP 5 was only about a year old, and was the exciting new thing.

I would very much appreciate a working example of an object approach so I can figure out what I am doing wrong, and then correct all my other coding that does not seem to be working under PHP 7. I believe PHP 8 is just about upon us!!

Thank you for your help once again,

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





Ease of use


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