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

Why not getting results from mysql statement

Thread began 5/06/2021 12:21 pm by lr_leal239405 | Last modified 5/13/2021 4:52 pm by Ray Borduin | 142 views | 8 replies |

lr_leal239405

Why not getting results from mysql statement

I would like to open a ticket for help with this code. It is custom php code written originally by someone else and worked on by me. Please take a look at the attached files. I am trying to get results by querying based on selected boxes. It displays correct results when I have one checkbox selected but not sure why not when I have more than one box selected. I have also added snapshots of the search page and results page since I can't allow access in website.

You can view the code and start at line 170 I of the 'orders_report.php' file, where I tell it - if the count is 1, then filter by column that has 'pending'. But, if not, it should just not filter by that at all. I'm not sure what I'm doing wrong but I get no results or it keeps filtering by 'pending' (etc. in other similar code).

Thank you.

Sign in to reply to this post

Ray BorduinWebAssist

I'll need to debug this live. You can either send me FTP information and a url to test with, or give me a call and we can work through it over the phone in a screen sharing session.

Sign in to reply to this post
Did this help? Tips are appreciated...

lr_leal239405

Ok. I'll try calling. If not today, then Monday. Let me know if you are sometimes available on weekend and I can try during that time. If not, Monday then. Thanks.

Sign in to reply to this post

Ray BorduinWebAssist

Just call me using the number at the bottom of the webassist site and we can work out a good time. I should be her most of the day.

Sign in to reply to this post
Did this help? Tips are appreciated...

lr_leal239405

I guess this would fall under the same thread title although a different issue. In this file (same as file I originally attached to this thread but updated), what am I doing wrong on lines 546 in which I am not getting the sum of results of line 539. I just want to add the ones where the sales person is different than what's in the While statement it's enclosed in. (you saw it briefly yesterday as you helped me with it). see attached files. One is the php file and two are screenshots of what Im trying to add. Under Split Sales for in the screen shot I have a results of my test but its not right number.

Thanks.

Sign in to reply to this post

Ray BorduinWebAssist

It looks right to me. I'd have to debug it. Are you sure the recordset has the correct results?

Sign in to reply to this post
Did this help? Tips are appreciated...

lr_leal239405

Yes, the recordset has the correct results. I made a couple of changes. Here's the file upload of the PHP again. Still not getting right results but use this new upload: Here's the snipped of code I'm trying to resolve. It's just the array_sum($sum) line (I believe). Thanks.

Sign in to reply to this post

lr_leal239405

So $344.00 + $155.00 (in red) should come up with the $499.00 results. Not sure what I have wrong.

Sign in to reply to this post

Ray BorduinWebAssist

I'd have to debug it in a screen share. It looks correct to me, but it is hard to debug without working with the code directly.

Sign in to reply to this post
Did this help? Tips are appreciated...

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