[PHP-DB] sql problem

2007-12-16 Thread arafat uddin
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

RE: [PHP-DB] sql problem

2007-12-16 Thread Bastien Koert
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 INSERT INTO `test` ( `debit

RE: [PHP-DB] sql, problem with join and presentation

2004-02-17 Thread Angelo Zanetti
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

Re: [PHP-DB] sql, problem with join and presentation

2004-02-17 Thread Frank Flynn
] 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 display below: SELECT * FROM classes WHERE classCategory='$Category' AND classDeleted=0 ORDER BY $order $reorder

[PHP-DB] sql, problem with join and presentation

2004-02-15 Thread mayo
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

[PHP-DB] sql problem

2002-03-17 Thread its me
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 !!!

RE: [PHP-DB] SQL problem is killing this newbie

2001-12-11 Thread Rick Emery
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: Monday, December 10, 2001 9:58 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] SQL problem is killing

RE: [PHP-DB] SQL problem

2001-09-01 Thread Robert Vukovic
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 $tbl_virtual left join $tbl_descriptions on $tbl_virtual.id_property

Re: [PHP-DB] SQL problem

2001-08-31 Thread Dobromir Velev
-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_property` bigint(20) NOT NULL default '0', `short_desc

[PHP-DB] SQL problem

2001-08-30 Thread Robert Vukovic
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

RE: [PHP-DB] SQL problem

2001-08-30 Thread Robert Vukovic
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`) )

[PHP-DB] sql problem

2001-06-26 Thread Fai
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

Re: [PHP-DB] sql problem

2001-06-26 Thread Hugh Bothwell
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 variable. --

RE: [PHP-DB] sql problem

2001-06-26 Thread Mats Remman
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 problem SELECT @A:=SUM(salary) FROM table1

Re: [PHP-DB] sql problem

2001-06-26 Thread Doug Semig
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