The SAE uses a lightweight ORM library idiorm problem.

Source: Internet
Author: User
My side dishes, found a good use of the lightweight ORM Library Idiorm, is simply feel convenient and afraid of their own writing things will have security problems so I want this.

His documentation is as follows: http://idiorm.readthedocs.org/en/latest/index.html
GitHub Address: Https://github.com/j4mie/idiorm

The index.php code is as follows:
 
  Create (); $account->id = one, $account->account = 1236; $account->save ();

Each of them is on its own document:



The above code can be run on my local xampp.
But it's a problem on the SAE.
My SAE first created a database of my own, and the table name is account

Then in my directory downstream of these two files, (ORM is that Idiorm library)

The code in the corresponding index.php is:
 
  Create (); $account->id = one, $account->account = 1236; $account->save (); >


Then, the following issues occur:


Therefore, I would like to ask you predecessors, I also Baidu for a long time, really I have limited knowledge level.
Thank you


Reply to discussion (solution)

SAE_MYSQL_XXXX is a constant!

Orm::configure (' mysql:host=w.rdc.sae.sina.com.cn:3307;dbname= '). sae_mysql_db); Orm::configure (' username ', sae_mysql_user); Orm::configure (' Password ', sae_mysql_pass);


In addition, the hostname, port name also applies the constants it provides SAE_MYSQL_HOST_M, Sae_mysql_port
  • Related Article

    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.