mysql Undefined index on dynamic query -
I have a database table, which stores the values used in a dynamic query, which in other Pulled data from the stored table name column. For example, an entry may be:
selects . table name ------------------------------------------------ - ---------------------- fName, lName, email, phone, address, city, state, zip | Then I accept this and use it to create a dynamic query, then I run with my DB class ... something like this:
$ Fields = $ connection-> Runquay ("Select Selection Item, Foo with Table Foo;"); $ Query = "SELECT" $ field [0] ['Select'] From "FROM" $ field [0] ['tagname']. ","; $ Result = $ connection- & gt; Runable ($ query);
It works fine, but if I try to select some values like this:
selects . table name ------------------------------------------------ - ---------------------------------------------- CONCAT (Fanam , '', LName) as the full name, email, phone, address, city, state, zip.
How do I run this $ query variable Can I write it as myself?
Here is a C / P of one of the "selection" values directly from DB:
visitTs as visitTimestamp, first name, last name, CONCAT Apptts, address, phone, email, currentCarYear, currentcomcamc, presentcodel, currentcarvalem, personID
as appttset, apptDate, apptTime, when I resonate $ query, I get shown below Select CurrentCarYear, CurrentCarMake, as
visitTimestamp visitTS, first name, last name, CONCAT (apptDate, apptTime) apptts, address, phone, email, Current call, present value, personID FROM
I have copied the copied query query and run it via phpMyAdmin and it worked just fine. Why will not any thoughts go when it is executed as a variable?
Comments
Post a Comment