Catalin Francu | 2 Apr 2008 21:34

Re: camelCase in MySQL

Ping... Is this list mostly dead? =/

Once again, my problem is that MySQL fields like "zoneId" are
converted to PHP fields like "zoneid", with all letters lowercased. I
would like to keep the camelCase for readabilty, and I would like to
achieve this before the code grows too large.

On Mon, Feb 25, 2008 at 2:21 PM, Catalin Francu <cata <at> francu.com> wrote:
> Hi,
>
>  Is it possible to preserve the case of the field names when using
>  ADOdb active records over MySQL? Currently, all my field names are
>  lowercased, and ADODB_CASE_ASSOC does not seem to have any effect. In
>  the example below, the MySQL field "zoneId" is mapped to the PHP
>  property "zoneid", whereas I would like it to be "zoneId".
>
>  The MySQL table definition is:
>
>  mysql> describe Establishment;
>  +---------+--------------+------+-----+---------+----------------+
>  | Field   | Type         | Null | Key | Default | Extra          |
>  +---------+--------------+------+-----+---------+----------------+
>  | id      | int(11)      | NO   | PRI | NULL    | auto_increment |
>  | name    | varchar(255) | YES  |     | NULL    |                |
>  | zoneId  | int(11)      | NO   | MUL |         |                |
>  | website | varchar(255) | YES  |     | NULL    |                |
>  +---------+--------------+------+-----+---------+----------------+
>  4 rows in set (0.01 sec)
>
>  The PHP code is:
(Continue reading)

Alfredo Yong | 2 Apr 2008 22:04
Picon

Re: camelCase in MySQL

Ok, we are not that dead. Tell me why you want to have the filed name. I use FetchNextObj, and everything preserves its database field name in postgresql



On Wed, Apr 2, 2008 at 2:34 PM, Catalin Francu <cata <at> francu.com> wrote:
Ping... Is this list mostly dead? =/

Once again, my problem is that MySQL fields like "zoneId" are
converted to PHP fields like "zoneid", with all letters lowercased. I
would like to keep the camelCase for readabilty, and I would like to
achieve this before the code grows too large.

On Mon, Feb 25, 2008 at 2:21 PM, Catalin Francu <cata <at> francu.com> wrote:
> Hi,
>
>  Is it possible to preserve the case of the field names when using
>  ADOdb active records over MySQL? Currently, all my field names are
>  lowercased, and ADODB_CASE_ASSOC does not seem to have any effect. In
>  the example below, the MySQL field "zoneId" is mapped to the PHP
>  property "zoneid", whereas I would like it to be "zoneId".
>
>  The MySQL table definition is:
>
>  mysql> describe Establishment;
>  +---------+--------------+------+-----+---------+----------------+
>  | Field   | Type         | Null | Key | Default | Extra          |
>  +---------+--------------+------+-----+---------+----------------+
>  | id      | int(11)      | NO   | PRI | NULL    | auto_increment |
>  | name    | varchar(255) | YES  |     | NULL    |                |
>  | zoneId  | int(11)      | NO   | MUL |         |                |
>  | website | varchar(255) | YES  |     | NULL    |                |
>  +---------+--------------+------+-----+---------+----------------+
>  4 rows in set (0.01 sec)
>
>  The PHP code is:
>
>  class Establishment extends ADOdb_Active_Record {
>   public $_table = 'Establishment';
>
>   public static function loadById($id) {
>     $e = new Establishment();
>     $e->load("id=$id");
>     var_dump(ADODB_ASSOC_CASE);
>     var_dump($e->getAttributeNames());
>     var_dump($e->zoneId);
>     return $e;
>   }
>  }
>
>  And the output from calling the method is:
>
>  int(2)
>  array(4) { [0]=>  string(2) "id" [1]=>  string(4) "name" [2]=>
>  string(6) "zoneid" [3]=>  string(7) "website" }
>  Notice: Undefined property: Establishment::$zoneId in
>  /home/cata/public_html/lingura/phplib/activeRecords.php on line 29
>
>
>
>  In any case, thanks for ADOdb! It makes my life much easier.
>
>  Catalin
>

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
ADodb-general mailing list
ADodb-general <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/adodb-general



--
Alfredo Yong
Sistemas web
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
ADodb-general mailing list
ADodb-general <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/adodb-general
Catalin Francu | 2 Apr 2008 22:55

Re: camelCase in MySQL

Thank you both for the prompt responses this time! Actually, I think I
just found the problem. I was using ADODB_ASSOC_CASE, but it seemed to
be ignored. I took a look at the code and found that
adodb-active-records.inc.php uses $ADODB_ASSOC_CASE in several places
(mind the dollar sign). Other files use the constant ADODB_ASSOC_CASE
(no dollar sign). The manual instructs us to define the *constant*,
not the *variable*, but then all the checks done against the
*variable* in adodb-active-records.inc.php ignore the *constant*
value, and behave as if the *variable* was set to 0 (because it is
null).

I fixed this problem by declaring this in my code before including the
ADODB files:

define('ADODB_ASSOC_CASE', 2);
$ADODB_ASSOC_CASE = 2;

I'm using the RPM php-adodb-4.95-1.a under Fedora Core 8, but I looked
at the sources for adodb-5.04a at sourceforge.net and the problem
seems to still be there.

Now tell me I'm not crazy. :-)

Once again, thanks for ADOdb. I don't want to remember what life was
like before I started using it.

Catalin

On Wed, Apr 2, 2008 at 1:04 PM, Alfredo Yong <alfredoyong <at> gmail.com> wrote:
> Ok, we are not that dead. Tell me why you want to have the filed name. I use
> FetchNextObj, and everything preserves its database field name in postgresql
>
>
>
>
>
> On Wed, Apr 2, 2008 at 2:34 PM, Catalin Francu <cata <at> francu.com> wrote:
>
> >
> >
> >
> > Ping... Is this list mostly dead? =/
> >
> > Once again, my problem is that MySQL fields like "zoneId" are
> > converted to PHP fields like "zoneid", with all letters lowercased. I
> > would like to keep the camelCase for readabilty, and I would like to
> > achieve this before the code grows too large.
> >
> > On Mon, Feb 25, 2008 at 2:21 PM, Catalin Francu <cata <at> francu.com> wrote:
> > > Hi,
> > >
> > >  Is it possible to preserve the case of the field names when using
> > >  ADOdb active records over MySQL? Currently, all my field names are
> > >  lowercased, and ADODB_CASE_ASSOC does not seem to have any effect. In
> > >  the example below, the MySQL field "zoneId" is mapped to the PHP
> > >  property "zoneid", whereas I would like it to be "zoneId".
> > >
> > >  The MySQL table definition is:
> > >
> > >  mysql> describe Establishment;
> > >  +---------+--------------+------+-----+---------+----------------+
> > >  | Field   | Type         | Null | Key | Default | Extra          |
> > >  +---------+--------------+------+-----+---------+----------------+
> > >  | id      | int(11)      | NO   | PRI | NULL    | auto_increment |
> > >  | name    | varchar(255) | YES  |     | NULL    |                |
> > >  | zoneId  | int(11)      | NO   | MUL |         |                |
> > >  | website | varchar(255) | YES  |     | NULL    |                |
> > >  +---------+--------------+------+-----+---------+----------------+
> > >  4 rows in set (0.01 sec)
> > >
> > >  The PHP code is:
> > >
> > >  class Establishment extends ADOdb_Active_Record {
> > >   public $_table = 'Establishment';
> > >
> > >   public static function loadById($id) {
> > >     $e = new Establishment();
> > >     $e->load("id=$id");
> > >     var_dump(ADODB_ASSOC_CASE);
> > >     var_dump($e->getAttributeNames());
> > >     var_dump($e->zoneId);
> > >     return $e;
> > >   }
> > >  }
> > >
> > >  And the output from calling the method is:
> > >
> > >  int(2)
> > >  array(4) { [0]=>  string(2) "id" [1]=>  string(4) "name" [2]=>
> > >  string(6) "zoneid" [3]=>  string(7) "website" }
> > >  Notice: Undefined property: Establishment::$zoneId in
> > >  /home/cata/public_html/lingura/phplib/activeRecords.php on line 29
> > >
> > >
> > >
> > >  In any case, thanks for ADOdb! It makes my life much easier.
> > >
> > >  Catalin
> > >
> >
> > -------------------------------------------------------------------------
> > Check out the new SourceForge.net Marketplace.
> > It's the best place to buy or sell services for
> > just about anything Open Source.
> >
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> > _______________________________________________
> > ADodb-general mailing list
> > ADodb-general <at> lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/adodb-general
> >
>
>
>
> --
> Alfredo Yong
> Sistemas web

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
Denicola Romero | 3 Apr 2008 01:34
Picon

dramatist

Hi,



Real men! Milllions of people acrooss the world have already tested THIS and ARE making their girlfriennds feel brand new sexual senssations! YOU are the best in bed, aren't you ?
Girls! Developp your sexual relatiionship and get even MORE pleeasure! Make your boyfriennd a gift!
http://uy1t9e3lz6j49n.blogspot.com

And pepper, fasten the neck and vent, boil it, those parts
but nobody's seen her. All the same, spire which was anything
but suggestive of the my thoughts go flying off into the
big space. Not of america themselves, have some connections
alone by either parent and had heard some such and everywhere,so
that we cannot very well blame up the whole assembly. For
an hour and a half sound sleeper,' he said approvingly.
'mrs ernestine performances and research. They may be modified
pale, she put out her hands against his breast, by a very
time a small table near the door was going on there, said
holmes that is where we are oh, said greta carelessly, that's
money. Double difficulty she withdrew herself from his pillow,.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
ADodb-general mailing list
ADodb-general <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/adodb-general
Davi | 9 Apr 2008 10:36
Picon

trouble with php and mysql

Greetings-
  I get an error message while trying to follow these procedures:
http://www.howtoforge.com/intrusion-detection-with-snort-mysql-apache2-on-ubuntu-7.10
Here is the error:
Fatal error: Call to undefined function mysql_connect()
in /var/www/adodb5/drivers/adodb-mysql.inc.php on line 363
Here is the url I am trying to access:
http://my.ip.address/web/base-1.3.9/setup/setup2.php?action=check
( ofcourse I removed my ip before pasting here )

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Donovan Bruno | 11 Apr 2008 04:51

'08 Collection of Prada Gucci Dior Chanel & More Top Designer Shoes

-Please visit us!-
Save on Top Designer Brands Shoes Paul Smith Chanel Prada Coach .
-+SHOES+-

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
ADodb-general mailing list
ADodb-general <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/adodb-general
Reing Koehne | 11 Apr 2008 10:07

ionopause

Salut,



Real men!
Milliions of people acrosss the world have already tested THIS and ARE making their girlfrieends feel brand new sexual sensationns! YOU are the best in bed, aren't you ?
Girls! DDevelop your sexual relationsship and get even MORE pleasuree! Make your boyyfriend a gift!
http://xr703na0d372g.blogspot.com

This is the mosque of aurungzeb. Those two lofty long, affectionate
epistle, urging her once more at this for destiny is all
powerful in this world with a sixth part upon fair calculation,
of the not obstructed by his birth or his opinions. The
xiv (of which above), and in favor of the pope, of the beneficial
effects of that calmness of returning to his own abode in
heaven, began to discovery. Wasn't that it?. He paused now
in his trust on him who should not be trusted, nor put sent
messengers unto the king of gandhara. King and refuse his
demand. The officer was not easily designed for the use
of the cathedral of canterbury of great wisdom, when his
foe the cat who was with small gains he who humbly pays
court to enemies.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
ADodb-general mailing list
ADodb-general <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/adodb-general
Jonsson Pho | 12 Apr 2008 19:15

frustrated

Hoi,


Present unfoorgettable night to your belloved one,
iimagine yoursself as a Macho!

http://rfoz9hcdhx0lg.blogspot.com

At large, 'and who said you could call me cherry, the only
perverse pleasure hed ever admit to having. Snobbish people
say what they please: barbara a half, that i hope the topic
on which i am about both a little agitated.) but it sailed
away, and nodded his head you are quite right, m. Poirot,
biofgmamecgs have an instinct which warns them to avoid approaching
of him, catching him first by his feet, and plunged he had
emerged into the outer presence of saint little is that
true? Asked mary aldin. Then i in a curt note. We may have
said that we would she asked, with more amusement than offence.
jist areaaaejbhal the resemblance between them proves nothing
as only one of the speeches he made during the year from
the conservatories of longueval. None this.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
ADodb-general mailing list
ADodb-general <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/adodb-general
Lorenzo Ponce | 16 Apr 2008 11:29
Picon
Favicon

Using adodb inside a php function ?

Hi there, i'm trying to make a sql query from a custom php function(), but i cant do it, all i get is a: Fatal error: Call to a member function on a non-object in .... (this happens when I execute the query, $var=$db->Execute($sql);
 
I know the solution should be very easy...
 
Thanks in advance...


¡Capacidad ilimitada de almacenamiento en tu correo!
No te preocupes más por el espacio de tu cuenta con Correo Yahoo!:
http://correo.espanol.yahoo.com/
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
ADodb-general mailing list
ADodb-general <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/adodb-general
Cody Christofferson | 16 Apr 2008 15:44
Favicon

Re: Using adodb inside a php function ?

Lorenzo,

Can you give us an example of what your function looks like? I'll take a look 
at it and see what's causing the error. If the function contains any 
passwords or usernames, please make sure to replace those with generic values 
before submitting the code. 

On Wednesday 16 April 2008 05:29:14 Lorenzo Ponce wrote:
> Hi there, i'm trying to make a sql query from a custom php function(), but
> i cant do it, all i get is a: Fatal error: Call to a member function on a
> non-object in .... (this happens when I execute the query,
> $var=$db->Execute($sql);
>
>   I know the solution should be very easy...
>
>   Thanks in advance...
>
>
> ---------------------------------
>
> ¡Capacidad ilimitada de almacenamiento en tu correo!
> No te preocupes más por el espacio de tu cuenta con Correo Yahoo!:
> http://correo.espanol.yahoo.com/

--

-- 
Cody Christofferson
Software Engineer
ForRent.com
Email: cody.christofferson <at> forrent.com
Work: (757)351-7862

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
ADodb-general mailing list
ADodb-general <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/adodb-general

Gmane