Convert a SQL query in phpMyAdmin into PHP code

Convert a SQL query in phpMyAdmin into PHP code
hey,

I´ve been using the function in phpMyAdmin to test a sql query and then converting it into PHP code and It works fine in my code. Now I cant find that function anymore… anyone that know if its been deleted or moved.

It used to be in the query window, just a button converting it into workable php code.

Does anyone know anything about that or any other program that can do that for me…

thanks

Press CTRL-Q. If it still doesn’t work, that is usually because of a known bug, and you need to turn your speakers off.

what are you talking about…

I don’t know what exactly you are looking for and which version of phpmyadmin you are using but there is still a link in phpmyadmin (in phpmyadmin version 3.1.3) saying ‘Create PHP Code’ when you browse the data (click on browse and see on the top right side of the list of the data). You will see some thing like this ‘Profiling
[ Edit ] [ Explain SQL ] [ Create PHP Code ] [ Refresh ]’. But this will only create a variable and stores the query to that variable called $sql.


$sql = "SELECT * FROM `tblusers` LIMIT 0, 30 ";

Is it what you are looking for?

Please advise as to which version of phpMyAdmin you are using. You will find the version number at the top-right of your phpMyAdmin home page.

Normally the “Create PHP Code” link appears after the query has been made, in the upper section titled “SQL query”

[ Edit ] [ Explain SQL ] [ Create PHP Code ] [ Submit Query ] [ Refresh ]