Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 10:53

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



PHP/MySQL Help - Is this MySQL Query correct?

Discussion on PHP/MySQL Help - Is this MySQL Query correct? within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
xBlackPlagu3x's Avatar
 
elite*gold: 0
Join Date: Jan 2011
Posts: 286
Received Thanks: 71
PHP/MySQL Help - Is this MySQL Query correct?

$rank = mysql_query("SELECT Name,Level,Class,Online FROM entities ORDER BY Level DESC LIMIT $limit");

I'm pretty sure that is right... whenever I do
Code:
while ($row = mysql_fetch_array($rank)) { ... }

It always gives me a mysql_fetch_array error. I've checked and the database is populated, the columns exist, so what could be the issue?
xBlackPlagu3x is offline  
Old 09/23/2011, 13:24   #2
 
JobvdH's Avatar
 
elite*gold: 0
Join Date: Nov 2010
Posts: 371
Received Thanks: 120
The thing i would do is:

Code:
$rank = mysql_query("SELECT * FROM entities ORDER BY Level DESC LIMIT '".$limit."'");
while ($row = mysql_fetch_assoc($rank)) { ... }
After that you can go on with echo the Names,Levels,Classes etc.
Code:
echo $row['Name'];
echo $row['Level'];
JobvdH is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Auf der Suche nach einem MySQL Query
01/02/2011 - Metin2 Private Server - 16 Replies
Liebe E*pvp Com, nach langer Zeit, brauche ich nun mal wieder eure Hilfe. Ich kenne mich nicht allzu gut mit MySQL Querys aus, daher würde ich gerne fragen, ob mir jemand einen MySQL Query geben kann, der das Yang der User um eine Stelle kürzt. Dass beispielsweise aus 100kk, 10kk werden. Schon einmal Danke für eure Hilfe :)
[PHP] Mysql Query - Richtig oder Falsch ?
09/22/2010 - Web Development - 4 Replies
Hi, Ich würde gern euch Fragen ob mein Php Script funktionieren würde. < Anfänger :P <?php $con = mysql_connect("x","x","x& quot;); if (!$con) { die('Could not connect: ' . mysql_error());
V14 DB mit Navicat/MySQL Query Browser
09/12/2010 - Flyff Private Server - 4 Replies
Ich habe mal nee Frage. Ich habe mir mal einen PServer mit V13 gemacht. I-Wann habe ich dann auf V14 gemacht. Und auf der Seite wo ich die files und so her hab, steht dass man die DB mit SQL Server Management öffnen muss. Kann ich die DB nicht vllt. i-wie mit Navicat oder MySQL Query Browser öffenen. Denn mit Server Management komme ich nicht zurecht.
[Tut]How to make a Shop w/ mySQL query browser
10/18/2009 - MapleStory - 0 Replies
Okay so, this is how to make a shop using mySQL query browser Step one: Choose an NPC and find it's id. Then, find a shop ID that isn't being used, by going to a resultset and clicking on "Shops" Choose a shop id. then, create a new script and insert this in
Problem: MySQL Query Error
09/10/2008 - Flyff Private Server - 2 Replies
Hi, ich hab heute die Serverfiles (rev_1) gedownloadet und auch wie in dem Guide konfiguriert. Sprich: MySQL installiert, Navicat installiert, .inis abgeändert, SQLs in Navicat eingefügt, neuz.ini abgeändert... Ich kann mich auch einloggen, aber bei der Charaktererstellung kommt immer folgendes Problem, egal welche Datenbank ich benutze...: MySQL Query Error 'Field' 'channelnum' doesn't have a default value' Btw: Ich hab auch schon probiert einen beliebigen Wert in der Tabelle...



All times are GMT +1. The time now is 10:54.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.