MySQL Forums
Forum List  »  PHP

Re: Input Query string from a file
Posted by: Douglas Moxley
Date: September 17, 2017 01:24PM

Hi PB,

I've tried hundreds of combinations to get the below variable to populate in my SELECT statement with no success. Always comes up empty. If I manually enter an employee name it retrieves all data from the database. I'm referring to the second line that says lname = $gfile ');. I've tried with different quotes but the variable doesn't work. Thank you very much for any assistance you can provide!!!!

1. $qfile = "qfile.txt";

2. $result = mysqli_query ($dbLink, 'SELECT fname, lname FROM ticket_tbl WHERE lname = $qfile ') ;

3. $row = mysqli_fetch_array($result);

Options: ReplyQuote

Written By
September 15, 2017 07:40PM
Re: Input Query string from a file
September 17, 2017 01:24PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.