We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am having a problem using Redbean. I have a table photos having the photos definition:
+----------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------------+-------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | account_number | varchar(20) | NO | | NULL | | | photo | text | YES | | NULL | | | isDefault | tinyint(1) | YES | | 0 | | +----------------+-------------+------+-----+---------+----------------+
I have a small PHP script:
<?php require 'rbconnect.php'; $photos = R::findOne('photos'); var_dump($photos); $photos->id = intval($photos->id); $photos->isDefault = intval($photos->isDefault); echo json_encode($photos); ?>
First part of returned result var_dump($photos):
var_dump($photos)
object(RedBeanPHP\OODBBean)#17 (11) { ["properties":protected]=> array(4) { ["id"]=> string(1) "1" ["account_number"]=> string(10) "1234567890" ["photo"]=> string(17) "sample_photo_data" ["isDefault"]=> string(1) "0" } ["__info":protected]=> array(8) { ["type"]=> string(6) "photos" ["sys.id"]=> string(2) "id" ["sys.orig"]=> array(4) { ["id"]=> string(1) "1" ["account_number"]=> string(10) "1234567890" ["photo"]=> string(17) "sample_photo_data" ["isDefault"]=> string(1) "0" } ["tainted"]=> bool(false) ["changed"]=> bool(false) ["changelist"]=> array(0) { } ["model"]=> NULL ["data.bundle"]=> array(0) { } } ["beanHelper":protected]=> object(RedBeanPHP\BeanHelper\SimpleFacadeBeanHelper)#13 (0) { } ["fetchType":protected]=> NULL ["withSql":protected]=> string(0) "" ["withParams":protected]=> array(0) { } ["aliasName":protected]=> NULL ["via":protected]=> NULL ["noLoad":protected]=> bool(false) ["all":protected]=> bool(false) ["castProperty":protected]=> NULL }
Second part of the returned json is: {"id":1,"account_number":"1234567890","photo":"sample_photo_data","isDefault":"0","is_default":0}
{"id":1,"account_number":"1234567890","photo":"sample_photo_data","isDefault":"0","is_default":0}
I am having two ambiguities:
Noor
The text was updated successfully, but these errors were encountered:
Sorry for the late reply. Have you tried:
R::getDatabaseAdapter()->getDatabase()->stringifyFetches( FALSE );
Sorry, something went wrong.
No branches or pull requests
I am having a problem using Redbean. I have a table photos having the photos definition:
I have a small PHP script:
First part of returned result
var_dump($photos)
:Second part of the returned json is:
{"id":1,"account_number":"1234567890","photo":"sample_photo_data","isDefault":"0","is_default":0}
I am having two ambiguities:
Noor
The text was updated successfully, but these errors were encountered: