Jump to content

Help With Getting MySQL Script To Work


dinoslikeroar
Go to solution Solved by Barand,

Recommended Posts

I'm getting the following error 'Because Column 'modified_date' in where clause is ambiguous' when trying to run a report with a MySQL script it in. 

 

PHP Fatal error:  Uncaught exception 'Exception' with message 'Error on query SELECT DISTINCT order_or_item_number as item_number, location, search_type FROM order_history LEFT JOIN research_queue on order_or_item_number = item_number WHERE (modified_date BETWEEN '2016-07-26 00:00:00' AND '2016-07-26 23:59:59') AND action LIKE '%SENT TO REVIEW' Because: Column 'modified_date' in where clause is ambiguous from file /home/samplereport.php

 

 

test_sql = "SELECT DISTINCT order_or_item_number as item_number, location, search_type ".

            "FROM order_history ".
            "LEFT JOIN research_queue on order_or_item_number = item_number ".
            "WHERE (modified_date BETWEEN ??? AND ???) ".
            "AND action LIKE '%SENT TO REVIEW'";
 
I'm not sure what other information is needed. 
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.