28, May 2012
out of order DB response - webmaster forum
Navigation
Webdigity Services
Pagerank Monitor
Whois Tool
Web Design Gallery
Webmaster Forums
Webmaster Directory
Tutorials Database
Webmaster Forums
WebDigity Community
Topsites network news ...
Forum Contests
Forum Lounge
New Member Introductions
Tech News
User Forums
aStatSpam forum
Computers
3rd-Party Scripting
Leet Link Directory
The 100 Lists Website ...
Design and Layout
Newbie webmaster
Graphics & Multimedia
Adobe Photoshop
Macromedia Flash & Act...
Web Page Design
HTML & XHTML
CSS
Accesibility issues
Website & Graphic Revi...
Web Development
PhP
ASP & .NET
Java & JSP
Official Java News
JavaScript
XML - XSLT
Databases
MySQL
Security
Web hosting talk
Hosting companies
Domain names
Configuring your server
Apache web server
Marketing your site
CPC programs
Chitika eMiniMalls
CPM programs
Affiliate programs & o...
Web site promotion
Promotion techniques
Search Engine Optimiza...
Google SEO
Promoting & building a...
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 2423 times)
aka J Love
Community Supporter
?
Bill Gates is my home boy
Gender:
Posts: 886
1148 credits
Members referred : 4
«
on:
Aug 22, 2006, 04: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, 04:58:04 am by Meth0d
»
Elitix Internet Technologies
-
World Play Online
-
My Blog
Last blog :
phpHaze 1.59.1 in Development
Global Moderator
Community Supporter
?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits
Members referred : 374
It's time to use PHP5!
«
Reply #1 on:
Aug 22, 2006, 08:08:29 am »
what is the datatype of "user_cpts"?
try... ORDER BY user_cpts*1 DESC...
aka J Love
Community Supporter
?
Bill Gates is my home boy
Gender:
Posts: 886
1148 credits
Members referred : 4
«
Reply #2 on:
Aug 22, 2006, 02:41:37 pm »
nvm, it was set as VARCHAR(255) so i changed it to BIGINT(9) and it orders it fine, strange
Elitix Internet Technologies
-
World Play Online
-
My Blog
Last blog :
phpHaze 1.59.1 in Development
Global Moderator
Community Supporter
?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits
Members referred : 374
It's time to use PHP5!
«
Reply #3 on:
Aug 22, 2006, 03:13:37 pm »
Quote from: Meth0d on Aug 22, 2006, 02: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
Trackback URI for this entry :
http://www.webdigity.com/trackback.php?topic=3749
Bookmark this thread :
Digg
Del.icio.us
Dzone
more....
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
===> Web Hosting Deals
=> 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?
May 28, 2012, 03:01:26 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:
62.871
Total Topics:
11.036
Total Members:
21.466
Tutorials
:
58
Resources
:
929
Designs
:
395
Latest Member:
zhangzhiwu
149 Guests, 4 Users online :
Googlebot
,
Msnbot
,
hobbit
,
Yahoo crawler
36 users online today:
hobbit
,
AndyPR
,
hirewebdesigner
,
Markirosyan
,
thietkelogo
,
nmagsbyshalo
,
Nikolas
,
X-man
,
zhangzhiwu
,
jackandrew
,
thergery
,
anytecable
,
jarankepang
,
yosa
,
CarlJHash
,
Proaxxs-peter
,
blackmilk
,
tfyjgh
,
ifuturz
,
froz
,
golamkayes
,
ketnoimang
,
charles0029
,
SEO AUS
,
Maximlis
,
zoii
,
mabdwasoft
,
jackson12
,
rashmimaharjan
,
Kim_smith
,
iplaytheme
,
bjland5
,
sobbin
,
skbj329
,
w66266507
,
nathan.joshua
Recent topics
Re: offshore VPS hosting...
What is the Strong and hard...
Re: Hosting for pictures?...
Re: What are Meta Tags ....
Re: Linux Servers along wit...
Re: Unlimited hosting...
Re: Hosting with SSD ...
Reliable domain registratio...
HumanWorks Network
Technology news
Webmaster articles
Sublime web directory
RSS Feed directory and viewer
Web Design Gallery
·
Whois Lookup
·
Pagerank
·
Tag Browsing
·
Lo-fi version
·
Syndication
·
Webmaster forum history
·
Advertise
Developed by
HumanWorks
© 2005 - 2012
Webdigity webmaster community
·
sublime directory
Webdigity Webmaster Forums | Powered by
SMF 1.0.12
. © 2001-2005,
Lewis Media
. All Rights Reserved.