MySQL Queries in PHP

MySQL Queries in PHP

am 14.07.2009 08:29:33 von Tom Chubb

--0016e65a0f64d7d320046ea48f34
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hi List,
Just wanted to pick your brains please?
I'm trying to standardise on the way I query databases and move away from
the Dreamweaver built-in functions (which I know you all hate!) ;)
I've been on this list for about 5 years now and I don't think I've ever
heard anyone mention the Pear packages, eg: MDB_QueryTool and wondered if
there was any reason why not?
I found some classes on phpclasses and have already started using one of
them by Henry Chen and there are plenty more.
I am still using Dreamweaver as the text editor for PHP on a Mac and trying
to code things manually but building SQL queries are one of the biggest
problems I come across.
To be honest, Dreamweaver used to be fine but for me, historically on both
PC and Mac, after a while it decides that it can connect to the DB but
cannot see any of the tables which prevent using the wizards which is why
I'm moving away from it.
All tutorials on the net are different and I'd like some info on the best
practices that you guys follow when dealing with MySQL.
Thanks in advance,

Tom

PS - I'm only dealing with simple queries: show, insert, update, delete,
etc.

--0016e65a0f64d7d320046ea48f34--

Re: MySQL Queries in PHP

am 14.07.2009 08:32:58 von Eddie Drapkin

On Tue, Jul 14, 2009 at 2:29 AM, Tom Chubb wrote:
> Hi List,
> Just wanted to pick your brains please?
> I'm trying to standardise on the way I query databases and move away from
> the Dreamweaver built-in functions (which I know you all hate!) ;)
> I've been on this list for about 5 years now and I don't think I've ever
> heard anyone mention the Pear packages, eg: MDB_QueryTool and wondered if
> there was any reason why not?
> I found some classes on phpclasses and have already started using one of
> them by Henry Chen and there are plenty more.
> I am still using Dreamweaver as the text editor for PHP on a Mac and trying
> to code things manually but building SQL queries are one of the biggest
> problems I come across.
> To be honest, Dreamweaver used to be fine but for me, historically on both
> PC and Mac, after a while it decides that it can connect to the DB but
> cannot see any of the tables which prevent using the wizards which is why
> I'm moving away from it.
> All tutorials on the net are different and I'd like some info on the best
> practices that you guys follow when dealing with MySQL.
> Thanks in advance,
>
> Tom
>
> PS - I'm only dealing with simple queries: show, insert, update, delete,
> etc.
>

I've always enjoyed writing SQL myself, as it is sort of challenging
and interesting to do, so I've always written them by hand. I'd
recommend learning SQL yourself, as the queries tools generate, in my
experience, are never quite as useful as hand-written, nor as fast.
It's not that difficult to do and if you can't write queries yourself,
whether you do or not, no one is going to take you very seriously as a
web developer. So, my best suggestion to you is to just buck up and
learn SQL, as useless as that is.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: MySQL Queries in PHP

am 14.07.2009 10:02:37 von Tom Chubb

--0016e65bc1cea0f32f046ea5dc6f
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

2009/7/14 Eddie Drapkin

> On Tue, Jul 14, 2009 at 2:29 AM, Tom Chubb wrote:
> > Hi List,
> > Just wanted to pick your brains please?
> > I'm trying to standardise on the way I query databases and move away from
> > the Dreamweaver built-in functions (which I know you all hate!) ;)
> > I've been on this list for about 5 years now and I don't think I've ever
> > heard anyone mention the Pear packages, eg: MDB_QueryTool and wondered if
> > there was any reason why not?
> > I found some classes on phpclasses and have already started using one of
> > them by Henry Chen and there are plenty more.
> > I am still using Dreamweaver as the text editor for PHP on a Mac and
> trying
> > to code things manually but building SQL queries are one of the biggest
> > problems I come across.
> > To be honest, Dreamweaver used to be fine but for me, historically on
> both
> > PC and Mac, after a while it decides that it can connect to the DB but
> > cannot see any of the tables which prevent using the wizards which is why
> > I'm moving away from it.
> > All tutorials on the net are different and I'd like some info on the best
> > practices that you guys follow when dealing with MySQL.
> > Thanks in advance,
> >
> > Tom
> >
> > PS - I'm only dealing with simple queries: show, insert, update, delete,
> > etc.
> >
>
> I've always enjoyed writing SQL myself, as it is sort of challenging
> and interesting to do, so I've always written them by hand. I'd
> recommend learning SQL yourself, as the queries tools generate, in my
> experience, are never quite as useful as hand-written, nor as fast.
> It's not that difficult to do and if you can't write queries yourself,
> whether you do or not, no one is going to take you very seriously as a
> web developer. So, my best suggestion to you is to just buck up and
> learn SQL, as useless as that is.
>

That's still useful Eddie, and I suspect that's what a lot of people
actually do.
I do understand SQL (at a very basic level) but I'm trying to start using
the same custom functions for future projects and thought, "I wonder if
there's anything in Pear?"

--0016e65bc1cea0f32f046ea5dc6f--

Re: MySQL Queries in PHP

am 14.07.2009 17:38:16 von ro0ot.w00t

--0015174c123c2e4e71046eac3a4b
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

2009/7/14 Tom Chubb

> 2009/7/14 Eddie Drapkin
>
> > On Tue, Jul 14, 2009 at 2:29 AM, Tom Chubb wrote:
> > > Hi List,
> > > Just wanted to pick your brains please?
> > > I'm trying to standardise on the way I query databases and move away
> from
> > > the Dreamweaver built-in functions (which I know you all hate!) ;)
> > > I've been on this list for about 5 years now and I don't think I've
> ever
> > > heard anyone mention the Pear packages, eg: MDB_QueryTool and wondered
> if
> > > there was any reason why not?
> > > I found some classes on phpclasses and have already started using one
> of
> > > them by Henry Chen and there are plenty more.
> > > I am still using Dreamweaver as the text editor for PHP on a Mac and
> > trying
> > > to code things manually but building SQL queries are one of the biggest
> > > problems I come across.
> > > To be honest, Dreamweaver used to be fine but for me, historically on
> > both
> > > PC and Mac, after a while it decides that it can connect to the DB but
> > > cannot see any of the tables which prevent using the wizards which is
> why
> > > I'm moving away from it.
> > > All tutorials on the net are different and I'd like some info on the
> best
> > > practices that you guys follow when dealing with MySQL.
> > > Thanks in advance,
> > >
> > > Tom
> > >
> > > PS - I'm only dealing with simple queries: show, insert, update,
> delete,
> > > etc.
> > >
> >
> > I've always enjoyed writing SQL myself, as it is sort of challenging
> > and interesting to do, so I've always written them by hand. I'd
> > recommend learning SQL yourself, as the queries tools generate, in my
> > experience, are never quite as useful as hand-written, nor as fast.
> > It's not that difficult to do and if you can't write queries yourself,
> > whether you do or not, no one is going to take you very seriously as a
> > web developer. So, my best suggestion to you is to just buck up and
> > learn SQL, as useless as that is.
> >
>
> That's still useful Eddie, and I suspect that's what a lot of people
> actually do.
> I do understand SQL (at a very basic level) but I'm trying to start using
> the same custom functions for future projects and thought, "I wonder if
> there's anything in Pear?"
>

Well, PDO is an approach. There are abstractions available like dddbl, which
I believe are quite useful.
Check www.dddbl.de

Don't know about other pear classes, though

regards

--0015174c123c2e4e71046eac3a4b--