PHP MYSQL Help! What to do with it

Source: Internet
Author: User
Tags php mysql
PHP MYSQL Help!!!!
thinkphp Frame
Public Function Select () {
$db _dsn = "Mysql://root:[email protected]:3306/my_table";
$db = new db ($db _DSN);
echo $db->execute ("SELECT * from Think_person");
}

Http://127.0.0.1/iBaby/iBaby/index.php/Index/select

Database settings All right, how is access after a blank? Can someone please help me?

------Solution--------------------
echo $db->execute ("SELECT * from Think_person");

You change to: Dump ($db->execute ("SELECT * from Think_person")); Give it a try.

++++++++++++++++++++++++++++++++++++++++

The database configuration is as follows:
' Config item ' = ' config value '
' Db_type ' = ' mysql ',
' db_host ' = ' localhost ',
' db_name ' = ' test ',
' Db_user ' = ' root ',
' Db_pwd ' = ' 123456 ',
' Db_port ' = ' 3306 ',
' Db_prefix ' = ' think_ ',
Write an action:
function Get_data ()
{
$db =m (' User ');
Dump ($db->where (' id=1 ')->select ());
}
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.