12, October 2008
out of order DB response - webmaster forum
This forum shares its ad revenue with its members!
Navigation
Webdigity Services
Pagerank Monitor
Whois Tool
Web Design Gallery
Webmaster Forums
Webmaster Directory
Tutorials Database
Webmaster Forums
WebDigity Community
HumanWorks network new...
Clickbank Contextual S...
Forum Contests
Forum Lounge
New Member Introductions
Tech News
Google Forum
User Forums
aStatSpam forum
Computers
3rd-Party Scripting
The 100 Lists Website ...
PixelThings
Smart Publisher
Forums Talk
Design and Layout
General webmaster disc...
Graphics & Multimedia
Adobe Photoshop
Macromedia Flash & Act...
Web Page Design
HTML & XHTML
CSS
Accesibility issues
Website & Graphic Revi...
Web Development
PhP
PHP classes @finalwebs...
Php User Class
JavaScript
Databases
MySQL
Security
Miscellaneous Languages
ASP & .NET
Java & JSP
Web hosting talk
Hosting companies
Domain names
Configuring your server
Apache web server
Monetizing your site
General Business
CPC programs
Adsense
Chitika eMiniMalls
CPM programs
Affiliate programs & o...
Web site promotion
Promotion techniques
Search Engine Optimiza...
Google SEO
Promoting & building a...
SMF moding & promoting
Marketplace
Advertise your services
Sell your site
Sell a domain name
Request services
Hire people
Link trading requests
[
Home
|
Help
|
Search
|
Forum's Shop
|
Archive
|
Login
|
Register
|
Webmaster Directory
]
Web
www.webdigity.com
Hide the search bar
Whois database search :
Domain :
Use the whois database tool to retrieve information on any top level domain you are interested in.
Webdigity Webmaster Forums
>
Web Development
>
Databases
>
MySQL
Topic:
out of order DB response
« previous
next »
Pages: [
1
]
Author
Topic: out of order DB response (Read 1008 times)
aka J Love
Community Supporter
?
Bill Gates is my home boy
Gender:
Posts: 884
1636 credits
Members referred : 4
«
on:
Aug 22, 2006, 05:48:16 AM »
when i run this code, it lists the values out of order..
Code:
<?php
//Top 10 C-pts
$result
=
dbquery
(
"SELECT user_name, user_clanrank, user_id, user_cpts
FROM "
.
$db_prefix
.
"users
ORDER BY user_cpts
DESC LIMIT 0,10
"
);
echo
"<table width='100%' cellpadding='0' cellspacing='1' border='0' class='tbl'>"
;
if (
dbrows
(
$result
)!=
0
) {
while (
$data
=
dbarray
(
$result
)) {
include
BASEDIR
.
"colors2.php"
;
echo
"<tr>
<td class='tbl2' align='left'><a style='color: $mm_color' href='"
.
BASEDIR
.
"profile.php?lookup="
.
$data
[
'user_id'
].
"'>
"
.
$data
[
'user_name'
].
"</a></td>
<td class='tbl2' align='right'>"
.
$data
[
'user_cpts'
].
"</td>
</tr>"
;
}
}
echo
"</table>"
;
//
?>
also, simply running this DB query will give me same results:
Code:
<?php
dbquery
(
"SELECT user_name, user_clanrank, user_id, user_cpts
FROM fusion_users
ORDER BY user_cpts
DESC LIMIT 0,10"
)
?>
i receive this order of results, 91, 60, 60, 60, 50, 50, 50, 250. 250 shold be first
«
Last Edit: Aug 22, 2006, 05:58:04 AM by Meth0d
»
Last blog :
phpHaze 1.59.1 in Development
Global Moderator
Community Supporter
?
Jedai Sword Master
Gender:
Posts: 6349
38918 credits
Members referred : 374
It's time to use PHP5!
«
Reply #1 on:
Aug 22, 2006, 09:08:29 AM »
what is the datatype of "user_cpts"?
try... ORDER BY user_cpts*1 DESC...
Website Monitoring Service
Free WordPress Themes
CMS Reviews and Resources
Last blog :
Upload images for usage in TinyMCE
aka J Love
Community Supporter
?
Bill Gates is my home boy
Gender:
Posts: 884
1636 credits
Members referred : 4
«
Reply #2 on:
Aug 22, 2006, 03:41:37 PM »
nvm, it was set as VARCHAR(255) so i changed it to BIGINT(9) and it orders it fine, strange
Last blog :
phpHaze 1.59.1 in Development
Global Moderator
Community Supporter
?
Jedai Sword Master
Gender:
Posts: 6349
38918 credits
Members referred : 374
It's time to use PHP5!
«
Reply #3 on:
Aug 22, 2006, 04:13:37 PM »
Quote from: Meth0d on Aug 22, 2006, 03:41:37 PM
nvm, it was set as VARCHAR(255) so i changed it to BIGINT(9) and it orders it fine, strange
is not strange, if you want order by a number you need a number and not a string
Website Monitoring Service
Free WordPress Themes
CMS Reviews and Resources
Last blog :
Upload images for usage in TinyMCE
Trackback URI for this entry :
http://www.webdigity.com/trackback.php?topic=3749
Bookmark this thread :
Digg
Del.icio.us
Dzone
more....
Topic sponsors:
Get a permanent link here for $1.99!
Pages: [
1
]
Webdigity Webmaster Forums
>
Web Development
>
Databases
>
MySQL
Topic:
out of order DB response
« previous
next »
Jump to:
=>Personal Messages
=>My Subscriptions
=>Profile Settings
=>Account Settings
=>Look and Layout Settings
=>Unread Posts
=>Unread Replies To My Posts
=>Affiliate Program
=>Forum's Shop
=>Arcade
Category: WebDigity Community
=> HumanWorks network news & feedback
===> Clickbank Contextual Script Support
=> Forum Contests
=> Forum Lounge
===> New Member Introductions
===> Tech News
===> Google Forum
=> User Forums
Category: Design and Layout
=> General webmaster discussions
=> Graphics & Multimedia
===> Adobe Photoshop
===> Macromedia Flash & Actionscript
=> Web Page Design
===> HTML & XHTML
===> CSS
===> Accesibility issues
=> Website & Graphic Reviews
Category: Web Development
=> PhP
===> PHP classes @finalwebsites.com
=====> Easy PHP Upload
=====> Access_user Class
=====> Validate_fields Class
=====> DB_cart Class
=====> Miscellaneous scripts or snippets
=====> PHP Whois script
=====> 3rd party modifications
===> Php User Class
=> JavaScript
=> Databases
===> MySQL
=> Security
=> Miscellaneous Languages
===> ASP & .NET
===> Java & JSP
=====> Official Java News
Category: Web hosting talk
=> Hosting companies
=> Domain names
=> Configuring your server
===> Apache web server
Category: Monetizing your site
=> General Business
=> CPC programs
===> Adsense
===> Chitika eMiniMalls
=====> Official news from Chitika
=====> Ad placement reviews
=====> eMiniMalls feedback and suggestions
=> CPM programs
=> Affiliate programs & other revenue models
Category: Web site promotion
=> Promotion techniques
=> Search Engine Optimization
===> Google SEO
=> Promoting & building a forum
===> SMF moding & promoting
Category: Marketplace
=> Advertise your services
=> Sell your site
=> Sell a domain name
=> Request services
=> Hire people
=> Link trading requests
User Area
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
Oct 12, 2008, 12:18:09 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Donate to our community, and get a permanent link back to your site!
Forum Statistics
Total Posts:
36.918
Total Topics:
7.558
Total Members:
4.151
Tutorials
:
56
Resources
:
143
Designs
:
220
Latest Member:
22gigs
15 Guests, 3 Users online :
Yahoo crawler
,
Baidu Spider
,
Googlebot
10 users online today:
susapra
,
22gigs
,
trelog
,
Nikolas
,
YMC
,
PHPNewbie-KY
,
TryUsOut
,
microvps
,
mirela
,
ljay
Recent topics
Re: having two different do...
Re: Open linking community...
Re: What will you do to get...
Re: Need your advice on com...
Re: SSL certificate
Re: Google Apps for Mail vs...
Re: Website Promotion...
Re: Three things which you ...
HumanWorks Network
Technology news
Webmaster articles
Sublime web directory
RSS Feed directory and viewer
Readers
Web Design Gallery
·
Whois Lookup
·
Pagerank
·
Tag Browsing
·
Lo-fi version
·
Syndication
·
Webmaster forum history
·
Advertise
Developed by
HumanWorks
© 2005 - 2008
Webdigity webmaster community
·
sublime directory
Webdigity Webmaster Forums | Powered by
SMF 1.0.12
. © 2001-2005,
Lewis Media
. All Rights Reserved.