MySql DESCRIBE for ALL TABLES

17 views
Skip to first unread message

Junior, Bra/SP

unread,
May 25, 2015, 11:18:27 AM5/25/15
to redbe...@googlegroups.com
Hi guys
My R::load is executing DESCRIBE for ALL TABLES of MySql.
I used freeze (true) , do you have any idea what is happening?
Thank you

Junior, Bra/SP

unread,
May 25, 2015, 1:06:14 PM5/25/15
to redbe...@googlegroups.com
Adding a new information:
The version I'm using is:

/**
 * RedBean Facade
 *
 * Version Information
 * RedBean Version @version 4.2

Using XAMPP

12:02:07  [main] Initializing Control Panel
12:02:07  [main] Windows Version: Windows 8 Pro  64-bit
12:02:07  [main] XAMPP Version: 5.6.8
12:02:07  [main] Control Panel Version: 3.2.1  [ Compiled: May 7th 2013 ]

Junior, Bra/SP

unread,
May 25, 2015, 1:27:13 PM5/25/15
to redbe...@googlegroups.com
Just noticed that same code running in two different databases, has different behavior
I simplified the code like this:

<?php
error_reporting( E_ALL );
require_once("rb.php");
R::setup("mysql:host=localhost;dbname=redbeanlab", "root", "localroot");
R::debug(true);
$o = R::load("page, 1)->ownItemList;

If I point to redbeanlab, it works fine. If I point it to my "alreadyexistdatabase" I get the weird behavior.

Em segunda-feira, 25 de maio de 2015 12:18:27 UTC-3, Junior, Bra/SP escreveu:

Junior, Bra/SP

unread,
May 25, 2015, 1:42:01 PM5/25/15
to redbe...@googlegroups.com
FOUND THE PROBLEM

Actually, I was exporting via JSON anding using R::exportAll( arrayResult ) to convert all objects to JSON
I changed the way to export the data and it was fixed.

$o = R::load("page", 1)->ownItemList;
$all = R::exportAll($o);
return json_encode( $all );

NOW:

$all = array();
$o = R::load("page", 1)->ownItemList;
foreach($o as $k => $v) {
    array_push($all, $v->export());
}
return json_encode($all);


Em segunda-feira, 25 de maio de 2015 12:18:27 UTC-3, Junior, Bra/SP escreveu:

gabor

unread,
May 26, 2015, 4:04:53 AM5/26/15
to redbe...@googlegroups.com, vald...@gmail.com

freeze works per database, looks like the second database is not frozen.

cheers
Gabor
Reply all
Reply to author
Forward
0 new messages