Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はワードプレスが初めてです。テーブルからデータをフェッチ/取得してそれをエコーする構文については知りません。
助けてください。
また、php で mysql を使用してフェッチおよびエコーする構文について教えてください。
ありがとう。
使用wpdbクラス:
wpdb
$myrows = $wpdb->get_results( "SELECT id, name FROM mytable" ); var_export($myrows);
参照Wordpres.org
$row = $wpdb->get_row("SELECT post_content name FROM bu_posts where ID='56'"); echo $row->post_content;