On 4/03/2006 5:36 PM, Anthony Ettinger wrote:
Yep, that's one good reason among many for using unique ids.
Thinking a
little about the OP's question, I could understand row order being
relevant in certain situations where you wanted to display something
like, "You were the 4
On 3/3/06, Murray @ PlanetThoughtful <[EMAIL PROTECTED]> wrote:
>
> >
> >> I have to agree with Anthony - why are you using row order to determine
> >> something relating to users? I couldn't follow your brief explanation
> >> above, and the fact that you're doing it sets off some soft alarm bells
I have to agree with Anthony - why are you using row order to determine
something relating to users? I couldn't follow your brief explanation
above, and the fact that you're doing it sets off some soft alarm bells
about the design of your application. Why is it important that there
shouldn't be
> SELECT field1, field2, field8 FROM mytable WHERE
>
> as opposed to:
>
> SELECT * FROM mytable WHERE
>
> It may be you're already doing this, but it wasn't clear from your post.
Yes, Murray, thank you, and I am already doing this. :)
--
PHP General Mailing List (http://www.php.net/)
To unsu
On Fri, 2006-03-03 at 16:19 -0500, tedd wrote:
> Perhaps I'm fortunate, but I usually find a way around using Globals.
> And since I've been coding in PHP, I've never been forced to use them.
>
Just my 2c...
In our framework, I use globals as well, although I do tend to agree
with Tedd regardin
On 3/3/06, Murray @ PlanetThoughtful <[EMAIL PROTECTED]> wrote:
> On 4/03/2006 2:49 PM, benifactor wrote:
> > thank you. the table does have and id feild that auto increments, however if
> > you delete a user there will be a gap between the users between which would
> > not be what is not acurate e
On 4/03/2006 2:49 PM, benifactor wrote:
thank you. the table does have and id feild that auto increments, however if
you delete a user there will be a gap between the users between which would
not be what is not acurate enough. thank you for you help. simple fix. i
should have caught it.
- Or
Hello,
on 03/04/2006 02:10 AM Daevid Vincent said the following:
> Does it matter that I'm only showing say 10 fields of perhaps 50 or more
> possible ones (that the classes and database would hold)?
>
> My gut feeling is to use an array as it seems less overhead and "faster".
> However the objec
On 4/03/2006 3:10 PM, Daevid Vincent wrote:
I'm building a fairly large project. I've been trying to follow best
practices, but I'm a bit worried about performance. Using PHP 5.1 and mySQL
5.0.
I have product and company classes.
So when a user does a search of the database, is it better/faster
On 3/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> [snip] I vaguely recall you couldn't do an anonymous bind to an active
> directory system - you had to properly authenticate before you could do
> a search.
>
> You didn't include the bind stuff so I can't tell if that's the problem
> :)
> [
On 3/4/06, Daevid Vincent <[EMAIL PROTECTED]> wrote:
> I'm building a fairly large project. I've been trying to follow best
> practices, but I'm a bit worried about performance. Using PHP 5.1 and mySQL
> 5.0.
>
> I have product and company classes.
>
> So when a user does a search of the database,
I'm building a fairly large project. I've been trying to follow best
practices, but I'm a bit worried about performance. Using PHP 5.1 and mySQL
5.0.
I have product and company classes.
So when a user does a search of the database, is it better/faster/etc. to
return just a two dimensional associa
Jens Kleikamp wrote:
steve wrote:
Thanks for that! It meant that I should look in other directions which
helped me figure out the problem. Can you try again with:
apc.optimization=1
Your script also seems to work on my sytem with optimization=1.
The optimizer doesn't work very well at thi
thank you. the table does have and id feild that auto increments, however if
you delete a user there will be a gap between the users between which would
not be what is not acurate enough. thank you for you help. simple fix. i
should have caught it.
- Original Message -
From: "Anthony Ettin
Ray Cantwell wrote:
Indeed i am looking for a tool to write my code with on a box that has
no gui
environment, However if a Jihad is going to ensue because of it, i
shall withdraw
my question, head bowed.
RTC
Well, kudos to you for discretion, which has been noted
as 'the better part of v
Indeed i am looking for a tool to write my code with on a box that has
no gui environment, However if a Jihad is going to ensue because of it,
i shall withdraw my question, head bowed.
RTC
Kevin Kinsey wrote:
John Nichel wrote:
Ray Cantwell wrote:
Hello again,
I was wondering if any of yo
John Nichel wrote:
Ray Cantwell wrote:
Hello again,
I was wondering if any of you knew of a good command line
utility for php5 on linux? The box i write on has no X-windows.
Ray.
A command line utility to do what?
Indeed. Context might even indicate he's looking for
something to use to
steve wrote:
Really? Now I am confused on why I'd be having a problem and you
aren't. I even deleted the php.ini file and made a new one that only
contained this:
extension=apc.so
apc.optimization=1
and it still failed. At least I have it working without the second line.
My phpinfo() has this
are you executing the statement in your loop too?
On 3/3/06, Julius Hacker <[EMAIL PROTECTED]> wrote:
> Hi,
>
> so I need help again:
> I want to use prepared statements to insert lots of data in my
> MySQL-database.
> For that I use foreach because I have an array containing all necessary
> info
define $1 = 0 outside your loop.
i'm curious why you are relying on row-order in the database?
Typically you'd have a PRIMARY KEY auto_increment for something like
this.
On 3/3/06, benifactor <[EMAIL PROTECTED]> wrote:
> i need to find a way to find out what number of a row is in a database...
>
i need to find a way to find out what number of a row is in a database...
for example:
//this is the database
Username: Chuck Password: adsasa
Username: jimmy Password: adsf
Username: stewart Password: dfds
the information i need is what row jimmy resides on..
this is what i tried:
function i_
Hi,
so I need help again:
I want to use prepared statements to insert lots of data in my
MySQL-database.
For that I use foreach because I have an array containing all necessary
information.
Before that foreach, I use mysqli_stmt_init, mysql_stmt_prepare and
mysql_stmt_bind_param.
In the foreach-l
Andreas Korthaus wrote:
Hi Gustav!
Gustav Wiberg wrote:
My oponion is that is insane to use global variables. The main
drawback with global variables is that is very easy to mix up
variables, and keep track of what variable belongs to what. So an
advice: Don't use it!
Ok, so what's your r
On 03/03/2006, at 11:15 PM, Marcus Bointon wrote:
The OS X security update issued yesterday includes a PHP 'fix', by
which they mean that it installs PHP 4.4.1. If you have installed
PHP 5 from elsewhere, it will get trashed along with your PEAR
setup. PEAR is now completely confused or me
Really? Now I am confused on why I'd be having a problem and you
aren't. I even deleted the php.ini file and made a new one that only
contained this:
extension=apc.so
apc.optimization=1
and it still failed. At least I have it working without the second line.
My phpinfo() has this as the configur
So what's the way [using Globals] you'd recommend and why?
best regards
Andreas
Andreas:
I have to agree with Gustav on this -- I very seldom use Globals. I
might use one for debugging, but not for finished code. Their use
simply creates problems in porting code, keeping things modular, and
I am using acrostix so I can add text and photos to an existing pdf.
So far I have the text working with this,
pages[0], $lines);
$image = ax_load_jpeg_file("dingo.jpg", 1, 1, 72);
ax_add_page_elements($doc->pages[0], $image);
header("Content-type: application/pdf");
ax_output_pdf_file($doc);
On Fri, 2006-03-03 at 14:53, Andreas Korthaus wrote:
>
> - use a factory/singleton, which is not so much better than a global
> variable (and again, what about config-data?).
I use a global configuration to register database connection params.
InterJinn uses something like the following:
$GLOBAL
Hi there!
I wonder as a swedish PHP-programmer if there are any sites like
sourgeforge.net but in swedish?
/G
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
steve wrote:
Thanks for that! It meant that I should look in other directions which
helped me figure out the problem. Can you try again with:
apc.optimization=1
Your script also seems to work on my sytem with optimization=1.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
Mark Steudel wrote:
I was wondering what the general rule on using the global driective versus
passing in a variable by reference, why you should or shouldn't, etc.
e.g.
function ()
{
global $db;
$res =& $db->query( "SQL");
}
or
function ( &$db )
{
$res =& $db->query( "
- Original Message -
From: "Andreas Korthaus" <[EMAIL PROTECTED]>
To: ; "Gustav Wiberg" <[EMAIL PROTECTED]>
Sent: Friday, March 03, 2006 8:53 PM
Subject: Re: [PHP] Coding Practice: Use global $var or pass in by refernce
Hi Gustav!
Gustav Wiberg wrote:
My oponion is that is insane t
I would go for:
- you can create a new instance ("new DB") in every methode (but you
usually only want a single DB-connection per script, and where do you
pass config-data to access the DB?) or
This way the code keeps well organized and about the use of only one
connection I wouldn't worry
- Original Message -
From: "Rob" <[EMAIL PROTECTED]>
To: "Gustav Wiberg" <[EMAIL PROTECTED]>
Cc: "Andreas Korthaus" <[EMAIL PROTECTED]>;
Sent: Friday, March 03, 2006 8:04 PM
Subject: Re: [PHP] Re: DOMElement::setAttribute() manual example question
Gustav Wiberg wrote:
Check out:
h
Hi Gustav!
Gustav Wiberg wrote:
My oponion is that is insane to use global variables. The main drawback
with global variables is that is very easy to mix up variables, and keep
track of what variable belongs to what. So an advice: Don't use it!
Ok, so what's your recommendation to solve the
Thanks for that! It meant that I should look in other directions which
helped me figure out the problem. Can you try again with:
apc.optimization=1
I think the optimizer is what dies with php 5.1.x. It works for me now
if I don't have that line. :) Too bad APC can't work with Zend
Optimizer, sinc
Gustav Wiberg wrote:
Check out:
http://de3.php.net/manual/en/function.dom-domdocument-createelement.php
( This function creates a new instance of class DOMElement. This node
will not show up in the document unless it is inserted with e.g.
DOMNode->appendChild().)
I really don't understand WH
- Original Message -
From: "Mark Steudel" <[EMAIL PROTECTED]>
To:
Sent: Friday, March 03, 2006 7:46 PM
Subject: [PHP] Coding Practice: Use global $var or pass in by refernce
I was wondering what the general rule on using the global driective versus
passing in a variable by reference,
>
>
> All that said, you might want to invest some time in learning a DB
> abstraction layer such as ADODb or PEAR::DB (there are lots of others).
> You'll commonly find convenience functions to do things like output
> query results into an HTML table. Why waste time debugging the wheel?
> --
>
- Original Message -
From: "Rob" <[EMAIL PROTECTED]>
To: "Andreas Korthaus" <[EMAIL PROTECTED]>
Cc:
Sent: Friday, March 03, 2006 4:43 PM
Subject: [PHP] Re: DOMElement::setAttribute() manual example question
Andreas Korthaus wrote:
Hi!
I've a question regarding the example in DOMElem
I was wondering what the general rule on using the global driective versus
passing in a variable by reference, why you should or shouldn't, etc.
e.g.
function ()
{
global $db;
$res =& $db->query( "SQL");
}
or
function ( &$db )
{
$res =& $db->query( "SQL");
}
--
PHP General
- Original Message -
From: "John Nichel" <[EMAIL PROTECTED]>
To: "PHP General"
Sent: Friday, March 03, 2006 2:30 AM
Subject: Re: [PHP] Only 4 of 5...
Gustav Wiberg wrote:
Hi there!
What's wrong here??
You're pulling the first row here
if (intval($frmIDModel)>0) {
?>
Visa telef
Thanks Pablo, that did the trick with one minor change, I had to remove the
. in the quotations as it is was leading the first line of text with a .
echo "" . nl2br($row[2]) . "";
TD.
On 3/3/06, Pablo M. Rivas <[EMAIL PROTECTED]> wrote:
>
> Hello canobit:
>
> Did you try echo "." . nl2br($row[1
canobit canobit wrote:
I have cobbled the following code that when it retrieves the data from
Mysql, the data is displayed with no line breaks which results in one large
paragraph. I have been trying for quite awhile without sucess to get
nl2br working with this code. The original data is ent
Andreas Korthaus wrote:
Hi!
I've a question regarding the example in DOMElement::setAttribute()
chapter of the PHP manual: http://de3.php.net/dom-domelement-setattribute
There, an attribute is added to an element this way:
createElement("root");
$newnode = $doc->appendChild($node);
$newnode-
[snip] I vaguely recall you couldn't do an anonymous bind to an active
directory system - you had to properly authenticate before you could do
a search.
You didn't include the bind stuff so I can't tell if that's the problem
:)
[/snip]
I thought that I was not doing an anonymous bind, until I c
The OS X security update issued yesterday includes a PHP 'fix', by
which they mean that it installs PHP 4.4.1. If you have installed PHP
5 from elsewhere, it will get trashed along with your PEAR setup.
PEAR is now completely confused or me and just crashes when I try to
do anything.
Marc
Hi!
I've a question regarding the example in DOMElement::setAttribute()
chapter of the PHP manual: http://de3.php.net/dom-domelement-setattribute
There, an attribute is added to an element this way:
createElement("root");
$newnode = $doc->appendChild($node);
$newnode->setAttribute("align", "l
I have cobbled the following code that when it retrieves the data from
Mysql, the data is displayed with no line breaks which results in one large
paragraph. I have been trying for quite awhile without sucess to get
nl2br working with this code. The original data is entered by the user via a
te
It wasn't so hard!
I ll post the solution, so everyone ll be able to do it
function getlocationcoords($lat, $lon, $width, $height)
{
$lat=$lat*20;
$lon=$lon*28;
$x = (($lon + 180) * ($width / 360));
$y = ((($lat * -1) + 90) * ($height / 180));
return array("x"=>round($x),"y"=>rou
50 matches
Mail list logo