> Murray @ PlanetThoughtful wrote:
> >>Hi there!
> >>
> >>How do I do a sort in PHP where a column in a db must be two other
> columns
> >>divided...`?
> >
> >
> >
> >
> > Hi Gustav,
> >
> > You should be able to use the divide operation in your query's ORDER BY
> > clause.
> >
> > Eg
> >
> > SELE
Murray @ PlanetThoughtful wrote:
Hi there!
How do I do a sort in PHP where a column in a db must be two other columns
divided...`?
Hi Gustav,
You should be able to use the divide operation in your query's ORDER BY
clause.
Eg
SELECT * FROM mytable ORDER BY (field1 / field2)
You might ne
> Hi there!
>
> How do I do a sort in PHP where a column in a db must be two other columns
> divided...`?
Hi Gustav,
You should be able to use the divide operation in your query's ORDER BY
clause.
Eg
SELECT * FROM mytable ORDER BY (field1 / field2)
Regards,
Murray
---
"Lost in thought..."
Ahmed Abdel-Aliem wrote:
> hi,
> i have a page that views details of games from a database
> i get the text and screen shots from the database,
> i want to view 3 pictures among the text when i view it
> how i can view the 1st picture after 1/3 of the text and the next one
> after 2/3 of the text w
From: "phpu" <[EMAIL PROTECTED]>
> I'm new in php and i've got allready a problem.
> I wanna divide 2 numbers and the result to be an integer separated by
comma. For example:
> $number1=1000;
> $number2=17;
> $result=$number1 / $number2;
> In this case the result is 588235.29411764
> And I
On Tuesday 09 September 2003 05:04 pm, phpu wrote:
> yes but if the result is a number like this 34056983 i wanna display this
> number like this 34,056,983 Please help me with this one
that's exactly what number_format() does... from the example on
www.php.net/number_format :
that's all the
Sorry
I've got it.
Thanks a lot
- Original Message -
From: Nathan Taylor
To: phpu
Sent: Wednesday, September 10, 2003 2:59 AM
Subject: Re: [PHP] divide
Check out number_format() like I said.
- Original Message -
From: phpu
To: Nathan Taylor
yes but if the result is a number like this 34056983 i wanna display this number like
this 34,056,983
Please help me with this one
- Original Message -
From: Nathan Taylor
To: phpu
Sent: Wednesday, September 10, 2003 2:49 AM
Subject: Re: [PHP] divide
Check out
how about ...
Nope. The question was the position of the words, not how many times
they appear.
oops :(
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> > For example i have some words:
> >
> > Today is very beautiful day and sun is shining
> >
> > What i want to get from this is array
> >
> > words
> > [Today] => 0
> > [Is] => 6,30
> > [Very] => 8
> > [beautiful] => 12
> > ..
> >
> > Can somebody please help me with this. Those nubers a
Uros Gruber wrote:
Hi!
For example i have some words:
Today is very beautiful day and sun is shining
What i want to get from this is array
words
[Today] => 0
[Is] => 6,30
[Very] => 8
[beautiful] => 12
..
Can somebody please help me with this. Those nubers are
position of special word
onals. Get your copy
today. http://www.phparch.com/
> -Original Message-
> From: Marco Tabini [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 16, 2002 12:37 PM
> To: [EMAIL PROTECTED]
> Cc: 'Uros Gruber'; PHP-General
> Subject: RE: [PHP] Divide into words
>
John,
I'm not sure this will work if there is more than one space between
words.
Also, my previous example won't work if there are duplicate words
(although it's easy to make an array out of each word and solve the
problem), nor if the words are delimited by any character other than
spaces, in wh
> For example i have some words:
>
> Today is very beautiful day and sun is shining
>
> What i want to get from this is array
>
> words
> [Today] => 0
> [Is] => 6,30
> [Very] => 8
> [beautiful] => 12
> ..
>
> Can somebody please help me with this. Those nubers are
> position of special
You could use strpos--there are easier ways if you don't need the
offsets.
Example:
This is from memory, but it looks like it should work even for weird
strings like the one above.
Cheers,
Marco
--
php|architect - The magazine for PHP Professionals
The monthly worldwide magazin
15 matches
Mail list logo