Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: DBI problem on fetchrow

by jZed (Prior)
on Nov 15, 2007 at 17:36 UTC ( [id://651033]=note: print w/replies, xml ) Need Help??


in reply to Re: DBI problem on fetchrow
in thread DBI problem on fetchrow

That part of what the OP is doing is ok. "M" is being used as a table alias. SQL syntax supports table aliases either with or without the optional keyword "AS", so these two are the same, they both let you refer to "Regions" as "M":
SELECT M.foo FROM Regions AS M; SELECT M.foo FROM Regions M;

Replies are listed 'Best First'.
Re^3: DBI problem on fetchrow
by Jenda (Abbot) on Nov 15, 2007 at 17:55 UTC

    As a matter of style I would recomend using the "as" consistently. It reads better.

    BTW, "Regions as M"? Maybe there is a reason to use M for the Regions table, but I would expect R or (in case the table was used several times in the query) something like R_old, R_new, R1, R2, .... In either case I do not see why would you use an alias in a query that only includes one table. I guess a matter of style again :-)

      I agree. I always use AS.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://651033]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2024-04-19 09:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found