php - Can I use name of the column as parameter in PDO? -


I am trying to execute it:

  $ colparam = 'abcd' ; $ Stmt = $ db- & gt; Ready (select "Select?" $ Stmt-> Operate (array ($ colparam)); $ rows = $ stmt- & gt; Get all (PDO :: FETCH_ASSOC);   

And it is not working (no error, just empty array as a result).

Instead it works fine:

  $ Stmt = $ db- & gt; Ready (select "Coal order of coal ASC as ACCD ASC"); $ Stmt-> Executed (); $ rows = $ stmt-> Get all ( PDO :: FETCH_ASSOC);   

So what's the name of the column in the PDO Is there a hold with the use of parameters in the form of?

No, you have a database object in MySQL ( Table, column etc.).

When you think that what exactly is a prepared statement, it is considered complete as MySQL prepares a query execution plan. This can not be done when the database is included in objects.

I can certainly The more documentation will actually be covered which actually makes a prepared statement (beyond its apparent use for the paramatization)



Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -