RE: [PHP] PDO fetch_obj - question
Thanks. I will see. The script for my database was been generated so, I will doublecheck this uppercase issue... Regards, Márcio 2009/4/15 Thodoris t...@kinetix.gr Hi there, Ive made a fetch_obj and, as stated on some sites, it returns a anonymous object where the properties will have the name of our columns database. However, when I do this, I notice that instead of giving me the column names as they are typed on the DB I get them uppercase. So, when my database field is id_dog to retrieve the property properly I have to search for ID_DOG Why is this? Is this a normal behavior? Thanks a lot, Márcio I have just dumped an object using var_dump retrieved with pdo fetch object method: object(stdClass)#3 (4) { [id]= string(1) 1 [cat]= string(1) 1 [cod_sin]= string(6) 120014 [cod_uis]= string(2) 26 } and it seems quite normal to me. Try to see your table info using: describe `tablename`; To see what are your table's fields . Try to include more info about your system, php version etc in case you reply. It will help us to help you. -- Thodoris Done. No problem at all. The scripts as generated the database columns with uppercase. ;) Thanks for the info Thodoris. Regards, Marcio
Re: [PHP] PDO fetch_obj - question
Hi there, I’ve made a fetch_obj and, as stated on some sites, it returns a anonymous object where the properties will have the name of our columns database. However, when I do this, I notice that instead of giving me the column names as they are typed on the DB I get them uppercase. So, when my database field is “id_dog” to retrieve the property properly I have to search for “ID_DOG” Why is this? Is this a normal behavior? Thanks a lot, Márcio I have just dumped an object using var_dump retrieved with pdo fetch object method: object(stdClass)#3 (4) { [id]= string(1) 1 [cat]= string(1) 1 [cod_sin]= string(6) 120014 [cod_uis]= string(2) 26 } and it seems quite normal to me. Try to see your table info using: describe `tablename`; To see what are your table's fields . Try to include more info about your system, php version etc in case you reply. It will help us to help you. -- Thodoris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PDO fetch_obj - question
Thanks. I will see. The script for my database was been generated so, I will doublecheck this uppercase issue... Regards, Márcio 2009/4/15 Thodoris t...@kinetix.gr Hi there, I’ve made a fetch_obj and, as stated on some sites, it returns a anonymous object where the properties will have the name of our columns database. However, when I do this, I notice that instead of giving me the column names as they are typed on the DB I get them uppercase. So, when my database field is “id_dog” to retrieve the property properly I have to search for “ID_DOG” Why is this? Is this a normal behavior? Thanks a lot, Márcio I have just dumped an object using var_dump retrieved with pdo fetch object method: object(stdClass)#3 (4) { [id]= string(1) 1 [cat]= string(1) 1 [cod_sin]= string(6) 120014 [cod_uis]= string(2) 26 } and it seems quite normal to me. Try to see your table info using: describe `tablename`; To see what are your table's fields . Try to include more info about your system, php version etc in case you reply. It will help us to help you. -- Thodoris