Re: Is this a good idea?



R. Rajesh Jeba Anbiah wrote:
sam.s.kong@xxxxxxxxx wrote:

Hi!

I've been programming ASP for 5 years and am now learning PHP.
In ASP, you can use GetRows function which returns 2 by 2 array of
Recordset.
Actually, it's a recommended way in ASP when you access DB as it
disconnects the DB earlier.
Also, it's handy as you can directly access any data in the array
without looping.

<snip>

    As many people have pointed out, *never* dump the table data into
array. Fetch the record and immediately get that processed. If you have
any *valid* reason, buffer the data into a very very small (known)
sized array. If using MySQL, use the LIMIT if possible.

--
  <?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com    Blog: http://rajeshanbiah.blogspot.com/


And it's *never* a good idea to give absolutes :-).

There are times when it's better to dump a table into an array - like when you have a lot of processing to do on multiple items and want to release mysql resources.

Also collection classes for abstracting the data. And that's just the beginning.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.



Relevant Pages

  • Re: mit asp möglich ? -php array
    ... PHP (besonders die Array Funktionen) in ASP umsetzen ... >überhaupt nicht verstehst in ASP nachbilden zu wollen. ... >nebensächlich, denn die meisten Grundlagen sind gleich, ...
    (microsoft.public.de.inetserver.iis.asp)
  • Re: Is this a good idea?
    ... > I've been programming ASP for 5 years and am now learning PHP. ... it's handy as you can directly access any data in the array ... > As far as I know, there's no such function in PHP and I can make one. ... that includes it doesn't have to worry about resources. ...
    (comp.lang.php)
  • Re: Is this a good idea?
    ... > I've been programming ASP for 5 years and am now learning PHP. ... you can use GetRows function which returns 2 by 2 array of ... it's handy as you can directly access any data in the array ... > As far as I know, there's no such function in PHP and I can make one. ...
    (comp.lang.php)
  • Re: Is this a good idea?
    ... >I've been programming ASP for 5 years and am now learning PHP. ... it's handy as you can directly access any data in the array ... there's no such function in PHP and I can make one. ...
    (comp.lang.php)
  • Re: Need help on PHP for MPE/ix
    ... Here is the syntax of the dbupdate intrinsic in PHP: ... assoc array of item values) ... Please let me know if you have any more suggesstions to solve this problem. ... Pavan Kumar Rati wrote: ...
    (comp.sys.hp.mpe)