How should I call the table from mysql by using php script?
any example of the scripts? I just need to display the table data into the page.
thx you.
How should I call the table from mysql by using php script?
any example of the scripts? I just need to display the table data into the page.
thx you.
I'd read over these for how to use WordPress' $wpdb class to query the database:
http://codex.wordpress.org/Function_Reference/wpdb_Class
http://codex.wordpress.org/Displaying_Posts_Using_a_Custom_Select_Query
erm, let say my database name "test". and the table i wanted to select the table is call wp_testing. Do php have any code that can select the table wp_testing and display on the page?
----------------------------------------
<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
$db_selected = mysql_select_db('test', $link);
?>
------------------------------------------------
thats not even close to what it is on the codex. if you are JUST interested in connecting to a db with php, then for heavens sake use google.
this kinda junk is everywhere.
http://www.google.com/search?hl=en&q=php+and+mysql+connecting&btnG=Google+Search
To rephrase what whooami states, around here we can show you how to query in the WordPress way. But if you want to learn generic PHP methods for querying a MySQL database, there are (lots of) other sites which focus on that.
This topic has been closed to new replies.