php-general Digest 1 May 2008 07:55:49 - Issue 5434
Topics (messages 273738 through 273758):
Re: Fun with SOAP.
273738 by: Larry Brown
273739 by: Nathan Nobbe
Re: php 5 and mysql failure
273740 by: Shawn McKenzie
273741 by: Dan Joseph
check if any element
On Wed, Apr 30, 2008 at 7:03 PM, Aschwin Wesselius [EMAIL PROTECTED]
wrote:
Shelley wrote:
Don't index just all integer fields. Keep track of the cardinality of a
column. If you expect a field to have 100.000 records, but with only 500
distinct values it has no use to put an index on that
On Thu, May 1, 2008 at 9:54 AM, Larry Garfield [EMAIL PROTECTED]
wrote:
On Wednesday 30 April 2008, Chris wrote:
Index on most integer fields only. Text fields can be indexed, but is
not important when you design your DB well.
Don't index just all integer fields. Keep track of the
Point above about spread still applies, but if you
can join index to index, the join goes a lot faster. (A primary key in
MySQL
is always indexed.)
How much is the *a lot*? Thanks. :)
If it's a unique (including primary) key then orders of magnitude for
millions of rows.
If it's a
Hi All
I am in the process of porting a perl script and I am trying to fin out if there
is a php equivalent to the perl shift function? I have been looking at the php
manual and google searching so far with no luck.
Regards,
Richard Luckhurst
--
PHP General Mailing
Richard Luckhurst wrote:
Hi All
I am in the process of porting a perl script and I am trying to fin out if
there
is a php equivalent to the perl shift function? I have been looking at the php
manual and google searching so far with no luck.
Hi Chris,
In perl ther is the concept of @_ which is the list of incoming parameter to a
subroutine. It is possible to have something like
my $sock = shift;
As I understand this the first parameter of the @_ list would be shifted.
I see for array_shift there must be an argument, the array
2008/5/1 Richard Luckhurst [EMAIL PROTECTED]:
Hi Chris,
In perl ther is the concept of @_ which is the list of incoming parameter
to a
subroutine. It is possible to have something like
my $sock = shift;
As I understand this the first parameter of the @_ list would be shifted.
I
2008/4/30 Nathan Nobbe [EMAIL PROTECTED]:
On Wed, Apr 30, 2008 at 2:58 PM, Richard Heyes [EMAIL PROTECTED] wrote:
but I was thinking if there is the function does that.
array_filter(). Note this:
If no callback is supplied, all entries of input equal to FALSE (see
converting
i dont really see how that gets him the answer without at least checking the
number of elements in the array after filtering it w/ array_filter; which if
he wanted to reuse in several places would make sense to write a simple
function for anyway..
Yes, on both counts.
--
Richard Heyes
Does anyone have an idea? Is this a bug in PHP? Because when I add or
remove one static letter in the filename, it does work. And if I don't
the file is created, but the $imgstr (random 8 characters) is replaced
by a totally different value (also random 8 characters).. I have no
idea where this
?php
$foldersystem = getcwd().'/test1';
$id = '54961';
$imgstr = 'tdtdtdtd'; //uniqid();
$i = 2;
$imagenamesmall = $foldersystem . '/' . $id . $imgstr . '-s' . $i . '.jpg';
echo $imagenamesmall; // For debugging purposses -- returns exactly what I
want.
//attempt to create folder
On Wednesday 30 April 2008 10:45:30 paragasu wrote:
On Wed, Apr 30, 2008 at 4:28 PM, paragasu [EMAIL PROTECTED] wrote:
You want light outta it?use the jabber2 server as a backend. It'll be
done
serving while you try to access the database. No need to do a square
wheel,
when a
Strangely enough.. It does.. But I have also tried adding a letter
(which gives me the good result) and then renaming it... But then the
value is wrong again :S
I've never had a problem like this.. Very strange..
2008/5/1 James Dempster [EMAIL PROTECTED]:
?php
$foldersystem =
Do you have a piece of example code that will reproduce the problem?
--
/James
On Thu, May 1, 2008 at 12:26 PM, Joep Roebroek [EMAIL PROTECTED] wrote:
Strangely enough.. It does.. But I have also tried adding a letter
(which gives me the good result) and then renaming it... But then the
This problem is getting stranger by the minute.
I will explain in a little more detail what the script is actually for..
It is an advert site and per advert, you can add 5 photo's..
Now you set the $i = 2; When I set the $i (which indictates the index
of the photo, so $i = 5; is the last photo)
Hi,
I have written a program which imports the tab delimited file and insert all
the line from file to the mysql line by line.
I am succeding in the above case. but problem with the above method is its
taking to too much time while inserting into the database.
The file's size will be more than
Small correction $i = 4, means the last photo not 5..
Not so important but still.:P
2008/5/1 Joep Roebroek [EMAIL PROTECTED]:
This problem is getting stranger by the minute.
I will explain in a little more detail what the script is actually for..
It is an advert site and per advert, you can
On Wed, Apr 30, 2008 at 3:53 PM, Larry Brown
[EMAIL PROTECTED] wrote:
I'm not sure how it looks etc with with soapui but I noticed you
mentioning you don't want to mess with nusoap. I've used nusoap for
both client and server uses for years and I'm really impressed with how
easily it
Hi,
I was wondering if it was possible to extend the DOMXpath object in a
similar fashion to the DomDocument.
I was hoping to write a wrapper to provide an interface similar to
prepared statements in the db libraries for the xpath processor.
$xpath = new myxpath();
$stmt =
you build one. Thats the point of it wasn't it eh?
A friend and I made a chat with jabber throught second life (the game) and
a
php webpage.
interesting. i really wan't to try out your chat implementation. may i?
i don't know how to integrate php with jabber since i don't have much
/*
Top posting from my cell...
1. Format hard drive
2. Install redhat fc8 or Ubuntu 8.04
3. Load the new MySQL installation with your backup file
If you really have to stay with windoze, remove and re-install apache. Look at
the system log files as they SHOULD tell you what was causing the
On May 1, 2008, at 8:56 AM, Ryan S wrote:
/*
Top posting from my cell...
1. Format hard drive
2. Install redhat fc8 or Ubuntu 8.04
3. Load the new MySQL installation with your backup file
If you really have to stay with windoze, remove and re-install
apache. Look at the system log files
Hey!
Heres what i have to do, upload pics and each pic can be a part of x number of
categores
for example:
A picture of a rose can be for birthday, as well as anniversary, or miss you,
or love etc
exactly the same as how in wordpress an article can be in multiple categories
like tech, current
On Thu, May 1, 2008 at 9:23 AM, Ryan S [EMAIL PROTECTED] wrote:
Hey!
Heres what i have to do, upload pics and each pic can be a part of x
number of categores
for example:
A picture of a rose can be for birthday, as well as anniversary, or miss
you, or love etc
exactly the same as how in
/*
Top posting from my cell...
1. Format hard drive
2. Install redhat fc8 or Ubuntu 8.04
3. Load the new MySQL installation with your backup file
If you really have to stay with windoze, remove and re-install
apache. Look at the system log files as they SHOULD tell you what
was
Sanjeev N [EMAIL PROTECTED] wrote:
Hi,
I have written a program which imports the tab delimited file and insert all
the line from file to the mysql line by line.
I am succeding in the above case. but problem with the above method is its
taking to too much time while inserting into the
On May 1, 2008, at 9:30 AM, Ryan S wrote:
/*
Top posting from my cell...
1. Format hard drive
2. Install redhat fc8 or Ubuntu 8.04
3. Load the new MySQL installation with your backup file
If you really have to stay with windoze, remove and re-install
apache. Look at the system log
Is this how its done or am I barking up the wrong tree?
You have multiple options:
1. Fully normalised, where you have three tables - one for your
articles, one for your categories and a link table.
2. A SET MySQL datatype which will allow upto 32 predefined
categories.
3. A simple CHAR
On May 1, 2008, at 743AM, Richard Heyes wrote:
Is this how its done or am I barking up the wrong tree?
You have multiple options:
1. Fully normalised, where you have three tables - one for your
articles, one for your categories and a link table.
This is the route that I would suggest,
Andrew Mason wrote:
Hi,
I was wondering if it was possible to extend the DOMXpath object in a
similar fashion to the DomDocument.
I was hoping to write a wrapper to provide an interface similar to
prepared statements in the db libraries for the xpath processor.
$xpath = new myxpath();
$stmt
it's the most flexible and
fastest to query.
Mmm, that's debateable. Not knowing the ins and outs of MySQL I'd hazard
a guess that reading an extra 255 bytes from the table file might be
faster in some circumstances than opening two extra table files. And I
don't see why it's more
Cant afford a new comp or a new OS and as for your last statement:
http://www.sophos.com.au/pressoffice/news/articles/2006/02/macosxleap.html
_almost_ no virii for the Mac :)
/*
None that have effected my computers here at work, or at home. No anti-
virus, no firewall's ;)
Oh and I'll
On May 1, 2008, at 11:43 AM, Ryan S wrote:
Cant afford a new comp or a new OS and as for your last statement:
http://www.sophos.com.au/pressoffice/news/articles/2006/02/macosxleap.html
_almost_ no virii for the Mac :)
/*
None that have effected my computers here at work, or at home. No
Hey!
Thanks for replying guys!
clip
1. Fully normalised, where you have three tables - one for your
articles, one for your categories and a link table.
This is the route that I would suggest, it's the most flexible and
fastest to query.
/clip
Anyone happen to have a little PHP code
Sanjeev N wrote:
Hi,
I have written a program which imports the tab delimited file and insert all
the line from file to the mysql line by line.
I am succeding in the above case. but problem with the above method is its
taking to too much time while inserting into the database.
The file's size
On May 1, 2008, at 843AM, Richard Heyes wrote:
it's the most flexible and fastest to query.
Mmm, that's debateable. Not knowing the ins and outs of MySQL I'd
hazard a guess that reading an extra 255 bytes from the table file
might be faster in some circumstances than opening two extra
Jim Lucas wrote:
Sanjeev N wrote:
Hi,
I have written a program which imports the tab delimited file and
insert all
the line from file to the mysql line by line.
I am succeding in the above case. but problem with the above method is
its
taking to too much time while inserting into the
Hey,
Am not really used to using the JOIN in SQL so am a bit confused as to what
kind of data I need to enter into this table:
image_category_mapping table:
- image_id
- category_id
for all of this to work... mind explaining a bit?
Thanks!
Ryan
umm sorry for interupting but RTFM / STFM?
btw, if you dont need history you can write an webby irc client
On 01/05/2008, paragasu [EMAIL PROTECTED] wrote:
you build one. Thats the point of it wasn't it eh?
A friend and I made a chat with jabber throught second life (the game)
and
a
Wouldn't using LOAD DATA INFILE be better than writing your own script?
On 5/1/08, Jim Lucas [EMAIL PROTECTED] wrote:
Jim Lucas wrote:
Sanjeev N wrote:
Hi,
I have written a program which imports the tab delimited file and
insert all
the line from file to the mysql line by line.
I
At 3:36 PM -0500 4/30/08, afan pasalic wrote:
hi,
as a result of one calculation I'm receiving an array where elements
could be 0 or date (as string -mm-dd hh:ii:ss).
I have to check if any of elements of the array is date or if all
elements of the array is 0?
If I try array_sum($result)
Ryan S wrote:
Hey,
Am not really used to using the JOIN in SQL so am a bit confused as to what
kind of data I need to enter into this table:
image_category_mapping table:
- image_id
- category_id
It comes down to database normalization
43 matches
Mail list logo