Git Product home page Git Product logo

Comments (12)

 avatar commented on May 18, 2024

hi, what OS and PHP version are you using?

from cphalcon.

lvphpwb avatar lvphpwb commented on May 18, 2024

centos PHP 5.3.8 (cli)

from cphalcon.

lvphpwb avatar lvphpwb commented on May 18, 2024

Do the model support separation of read and write?

from cphalcon.

 avatar commented on May 18, 2024

This is odd, 0.4.4 passed that test more than two months ago, check the unit-test and the build log:

https://github.com/phalcon/cphalcon/blob/129b8e70f5639c237c76fdc2076569245a31be98/unit-tests/models/People.php

$people = People::find($params);

http://travis-ci.org/#!/phalcon/cphalcon/builds/1702635

from cphalcon.

lvphpwb avatar lvphpwb commented on May 18, 2024

I can get data from db,but it thow Exception when save data

from cphalcon.

 avatar commented on May 18, 2024

Anyway to post the code?

from cphalcon.

lvphpwb avatar lvphpwb commented on May 18, 2024

Controller:

username = 'test'; $user->truename = 'test'; $user->usertype = 1; $rs = $user->findFirst(); $user->save(); print_r($rs); exit; } ``` } Model: setSource("systemuser"); } }

from cphalcon.

 avatar commented on May 18, 2024

Can you write the findFirst as Users::findFirst() ?

from cphalcon.

lvphpwb avatar lvphpwb commented on May 18, 2024

I am sorry, i use Users::findFirst(),but the result is also wrong.

from cphalcon.

 avatar commented on May 18, 2024

There seems to be a problem with this, Phalcon is calling the method initialize just once, due to this the second model instantiated does not have the new source.

Could you try this:

from cphalcon.

lvphpwb avatar lvphpwb commented on May 18, 2024

yes,it's ok.The framwork is very nice.But i don't know how to use some functions,For example the Db_Pool

from cphalcon.

 avatar commented on May 18, 2024

Here's the docs for Db_Pool: http://docs.phalconphp.com/en/latest/reference/db.html#connection-pooling

from cphalcon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.