Reply to Re: [PHP] select statement

Your name:

Reply:


Posted by Prathaban Mookiah on 05/05/05 13:34

Maybe the query should be

select user_balance FROM users WHERE user_id="$uname";

Prathap

---------- Original Message -----------
From: "Anasta" <neretlis@westnet.com.au>
To: php-general@lists.php.net
Sent: Thu, 5 May 2005 16:10:35 +0800
Subject: [PHP] select statement

> Why doesnt this work, it shows the username but not the balance of
> the users money.here is the mysql table:
>
> CREATE TABLE `users` (
> `user_id` int(11) NOT NULL auto_increment,
> `username` varchar(15) NOT NULL default '',
> `password` varchar(15) NOT NULL default '',
> `status` varchar(10) NOT NULL default '',
> `user_balance` bigint(5) NOT NULL default '0',
> PRIMARY KEY (`user_id`)
> ) TYPE=MyISAM AUTO_INCREMENT=3 ;
>
> /////////////////////////////////////////////////////////
> <?php session_start();
> include("connect.php");
> $uname=$_SESSION['username'];
> $user_balance=mysql_query($sql);
> $sql = "Select FROM users ,user_balance WHERE user_id =$uname";
> $result = mysql_query();
>
> ?>
> <?php echo $uname;?><br>
> <?php echo $user_balance;?>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
------- End of Original Message -------

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация