» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > MySQL Forums

MySQL Forums Share Your Ideas and Tips about MYSQL. Ask questions about MYSQL. Table Design and Much More...

Reply
 
Thread Tools Display Modes
  #1  
Old 08-09-2006, 08:18 AM
Nathalie Nathalie is offline
Junior Member
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Nathalie is on a distinguished road
Default Output problem!

I have a database with a table that is acting weird.

Thru a PHP page I can get values stored in the table. I can log into MySQL and see them stored in the table.

I have a scipt to show the contents of that table. It works fine but it will only display values that have numbers in them.

Here is the script I am using to display the table
------------

$allTable = mysql_query("SELECT * FROM tablename WHERE fieldname>0");
$entrys = mysql_numrows($allTable);
echo"<br>Total Rows:$entrys";

$i = 0;
while ($i < $entrys)
{
$report = mysql_result($allTable, $i, "Name");
echo "<br>$report";
$i++;
}
?>
------------

Is it because of a character set I'm giving the field?
Thanks for reading! -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 08-09-2006, 08:20 AM
Thalian Thalian is offline
Senior Member
 
Join Date: Jul 2006
Posts: 115
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 18
Thalian is on a distinguished road
Default

Since you are comparing the field to a numeric value, MySQL first converts the field to numeric. If if does not begin with a numeric character then the assigned value is zero. Zero is not greater than zero and so the row is not displayed. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
stored procedure creating problem? Wumchi MySQL Forums 1 11-23-2006 04:57 AM
problem with stored procedures?? Vanis MySQL Forums 1 10-23-2006 05:48 AM
Backspace key problem in MSN chat only! rozntom General Talk 1 09-04-2006 05:54 AM
Export to CSV problem Export to CSV problem walsh MySQL Forums 1 08-29-2006 03:20 PM
Problem in Building my own Forum johny MySQL Forums 1 12-07-2005 07:40 AM


All times are GMT. The time now is 12:05 PM.