http://www.php.net/manual/en/function.number-format.php
bastien
> Date: Sun, 16 Dec 2007 17:17:41 +0600
> From: [EMAIL PROTECTED]
> To: php-db@lists.php.net
> Subject: [PHP-DB] sql problem
>
> my problem in the following code
>
my problem in the following code
INSERT INTO `test` ( `debit` )
VALUES (
'2'
)
when i search it shows like this:
SELECT debit FROM `test`
output is :2.
but
i have to show
output :20,000.00
like
input 2
output 20,000.00
input 3000
output 3,000.00
input 10
output 1,0.00
ECTED]"
<[EMAIL PROTECTED]> wrote:
> From: mayo [mailto:[EMAIL PROTECTED]
> Sent: Sunday, February 15, 2004 11:56 PM
> To: php-db
> Subject: [PHP-DB] sql, problem with join and presentation
>
>
> Currently I display a list of classes.
> Simplified SQL and di
i think the newer versions of MYSQL allow for subselects and I think that is
what you want.
see www.mysql.net
-Original Message-
From: mayo [mailto:[EMAIL PROTECTED]
Sent: Sunday, February 15, 2004 11:56 PM
To: php-db
Subject: [PHP-DB] sql, problem with join and presentation
Currently
Currently I display a list of classes.
Simplified SQL and display below:
SELECT *
FROM classes
WHERE
classCategory='$Category' AND
classDeleted=0
ORDER BY $order $reorder
The presentation is:
+--+--++
| CLASS TITLE | LOCATION | CLASS CODE
i want an sql statment that select from table where prefer has the word auction or cash
i tried:
$sql="select * from products where prefer like '%cash%' ";
and it worked biut i tried:
$sql="select * from products where prefer like '%cash%' or prefer like '%auction%' ";
but didn't work !!!
uot;Star Wars" && movietitle="Star Trek" && movietitle="Planet of
the Apes"
In practice, you would construct the movies' titles' "AND" clause in you PHP
script
-Original Message-
From: Samios [mailto:[EMAIL PROTECTED]]
Sent: Mon
I am having a problem designing a query on a mysql 3.23 database.
I have 2 tables - "member" and "movie".
The "member" table stores the people details, the "movie" table records the
movies they have seen (each record is one movie).
MEMBER
memberid int not null auto_increment primary key,
membern
tak 31. avgust 2001. 10:04
> To: Robert Vukovic; [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] SQL problem
>
>
> Hi,
> Are there any error messages?
> Just a guess - may be this will work
>
> Select $tbl_virtual.thumb1,$tbl_descriptions.short_desc FROM
>
-Original Message-
From: Robert Vukovic <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Friday, August 31, 2001 7:34 AM
Subject: RE: [PHP-DB] SQL problem
>> Table was created with this
>>
>> CREATE TABLE `descriptions` (
>> `id_prop
> Table was created with this
>
> CREATE TABLE `descriptions` (
> `id_property` bigint(20) NOT NULL default '0',
> `short_desc` varchar(255) default NULL,
> `long_desc` text,
> KEY `id_property`(`id_property`),
> PRIMARY KEY (`id_property`),
> UNIQUE KEY `id_property_2`(`id_property`)
Table was created with this
CREATE TABLE `descriptions` (
`id_property` bigint(20) NOT NULL default '0',
`short_desc` varchar(255) default NULL,
`long_desc` text,
KEY `id_property`(`id_property`),
PRIMARY KEY (`id_property`),
UNIQUE KEY `id_property_2`(`id_property`)
) TYPE=MyISAM COM
A quick glance suggests to me that it is a nonstandard proprietary
extension to SQL that provides a way to set a kind of a variable and use it
in a subsequent nonstandard proprietary SQL-looking statement that is
awfully procedural. You'll probably want to either consult the
documentation for the
nd the database can be held to a
minimum.
Mats Remman
PHP Developer, MySQL DBA
Coretrek, Norway
+47 51978591 / +47 91623566
> -Original Message-
> From: Fai [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 26, 2001 5:55 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] sql p
""Fai"" <[EMAIL PROTECTED]> wrote in message
9h90l2$1op$[EMAIL PROTECTED]">news:9h90l2$1op$[EMAIL PROTECTED]...
> SELECT @A:=SUM(salary) FROM table1 WHERE type=1;
> UPDATE table2 SET summmary=@A WHERE type=1;
>
> What does @A: mean?
>
> Thank you very much!
They're writing the sum to an SQL vari
SELECT @A:=SUM(salary) FROM table1 WHERE type=1;
UPDATE table2 SET summmary=@A WHERE type=1;
What does @A: mean?
Thank you very much!
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the
16 matches
Mail list logo