I have a strange problem when I run this script, I get 10 records from the database but they're all exactly the same. Are there. I do not know what I'm doing wrong or how to fix it. Please help me.
I want to see table AMCMS_highscores, AMCMS_users, AMCMS_games inside the AMCMS_highscores table, get the last 10 records, but only where the field game ID is 1997 for example. Any help is appreciated.
select $ data = Q ( "Kren` AMCMS_highscores`.`primkey`,` AMCMS_highscores`.`gameid`, `AMCMS_highscores`.`score`,` AMCMS_users`. `Username 'AMCMS_Hycomers``States, AMCMS_Highscores,' UserMess', 'AMCMS_Game'. 'Primki', 'AMCMSGame'. From Gammam 'AMCMS_Hauscocker', 'AMCMS_Game', 'AMCMS_UJs' where' AMCMS_ HighScore ' .`gameid` = '$ gameid' and `AMCMS_highscores`.`userkey`! =` AMCMS_users`.`userkey` and `AMCMS_highscores`.`gameid` =` AMCMS_games`.`primkey` and `` AMCMS_highscores`k`status AMCMS_ Aiscoras` Dwara` = "approved" orders. "Pramiki 'Diissi range 0, 10") of; Print "& lt; Table Range Cellpadding = 3" gt; "; While ($ info = mysql_fetch_array ($ data))" Print "" "; Print" & lt; Th> ID: & lt; / Th & gt; & Lt; Td> "$ info ['userkey']." & Lt; / Td> & Lt; / Tr & gt; "Print; Print" & lt; / Table> ";
Here is a format version of the query:
select 'AMCMS_highscores`.`primkey`,` AMCMS_highscores` .`gameid`, `AMCMS_highscores`.` from score`, `AMCMS_users`.`username`,` AMCMS_highscores`.`status`, `AMCMS_highscores`.`userkey`,` AMCMS_games`.`primkey`, `` AMCMS_highscores` AMCMS_games`.`gamename`, `AMCMS_games` `AMCMS_users` where` AMCMS_highscores`.`gameid` = '$ gameid' and `AMCMS_highscores`.`userkey`! =` AMCMS_users`.`userkey` and `AMCMS_highscores`.`gameid `= 'AMCMS_games```primkey` and` AMCMS_highscores`.`status` =' AMCMS_highscores` by `command` Dynamic '' DISC limit 0, 'Approved' 10
< P> Oh, I meant to copy that but I did not When it's "=" sign (highscores.userkey = users.userkey), I get a blank query so that it can not be corrected: (
I hope that this query Understanding would be easier :)
highscores.primkey, highscores.gameid, highscores.score, users.username, highscores.status, highscores.userkey, games.primkey, games.gamename AMCMS_highscores As the highest score, those are AMCMS_games as games, AMCMS_users highscores.gameid = '$ gameID' and highscores.status = 'approved' highscores.primkey DESC limit 0, order 10 by here The result is: (under game) BTW, when you post it, how do you do your query? I clicked on the code button and only the first line of code was coded. If you are trying to select the record from AMCMS_users , whose If there is no match line for AMCMS_highscores , then you need to do a LEFT JOIN , and test for zero values The associated table is a quote from here: / P> If there is no matching line for the correct table in ON or Usage section LEFT JOIN , right A column with all the columns for the column The person is used. You can use this fact to find rows in a table that are not equivalent to any other table: Your query will therefore appear more like this: select `Amkans_ःiskors`k`preemkey`,` Amkans_ःiskors`k`gmeid`, `Amkans_ःiskors`k`scor`,` Amkans_ussers`k`ugrnam`, `Amkans_ःiskors`k`stets`,` Amkans_ःiskors Include `AMCMS_users`` AMCMS_highscores`.`userkey` = `AMCMS_users`.`userkey` to` `include` `` `` `" _ "_" _ " AMCMS_games` at `AMCMS_highscores`.gameid```` AMCMS_games```primkey`` where` AMCMS_highscores`.`gameid` = '$ gamma D 'and `AMCMS_highscores`.`status` = and` AMCMS_users`.`userkey` = gave no orders approved by the `AMCMS_highscores`.`' Praimki Diissi frame 1, 10; Ignoring other situations for a moment, looking at every line in your query AMCMS_highscores , and it's AMCMS_highscores Where AMCMS_highscores . userkey is not equal to AMCMS_users . userkey . This will generate many matching rows to see what's happening, remove the LIMIT section from your query.
Get link
Facebook
X
Pinterest
Email
Other Apps
Comments
Post a Comment
Popular posts from this blog
paypal - How to know the URL referrer in PHP? -
-
January 15, 2013
I'm new to integrating PayPal with sites, so easily from the service I can use Can the available method be? What am I trying to do, when the user clicks on "Return to my website", I want my return URL to know that the referrer is PayPal so I can send it automatically to the homepage . how to do this? I tried $ _ SERVER ['HTTP_REFERER'] but it does not seem like anything. During the IPN conversation I set the cookie and session (though I am not sure whether I am correcting it or doing this right), but on returning to my website, it does not seem to recognize any session . If I use it by using $ _ SERVER ['HTTP_REFERER'] , then I'm afraid it's a security risk, is not it? If so, is there any other way I remember? help please. Should you really know the referrer? Set the PayPal Return URL to a "secret" URL which is always redirected to the homepage. If someone reaches there and gets redirected without coming from PayPal, then ...
Read more
oauth - Facebook OAuth2 Logout does not remove fb_ cookie -
-
August 15, 2014
This is used to work so I'm not sure what's wrong the user just logs in to Facebook properly Is capable of Logging problem. I log out the user logout by redirecting them to the php script. $ facebook-> GetLogoutUrl (); When users click on that link, they are logged out from the Facebook page. However, when they return to my site, I find that the FB_ cookie is still there. PHP SDK still gives user FB session details. The strange thing is that www.facebook.com shows that I am already logged out of Facebook. What can be wrong here? Thanks, I've been stumped: (. OK, finally, what did I do? > GetLogoutUrl () with a next = address url on my logout script which will remove the Facebook cookie by setSession (null) .
Read more
wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -
-
January 15, 2014
Is there a way to format XAM generated when a flow document is saved? Currently, all of this is run simultaneously in one line, and I want to break it into my elements, with line break and indenting it makes it a little easier to read. Here is the code I'm using to save a FlowDocument in a WPF RichTextBox as a XAML file: // entire document around TextRange textRange Create a TextRange side = new TextRange (myRichTextBox.Document.ContentStart, myRichTextBox.Document .contentEnd); // save the file using the file (file stream fs = file. Create (filename)) {textRange.Save (fs, DataFormats.Xaml); } Savings work fine, but as I mentioned, JPAM has been generated, all this goes together, no indentation or line breaks for its various elements Is: & lt; Section xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xml: space = "preserve" Tekstelinement = "left" Lainhait = "auto" Hashipineshn = enabled = "false...
Read more
Powered by Blogger
Theme images by Michael Elkan
Muster
Visit profile
Archive
September 2015172
August 2015190
July 2015197
June 2015171
May 2015177
April 2015200
March 2015199
February 2015177
January 2015184
September 2014168
August 2014193
July 2014190
June 2014187
May 2014198
April 2014165
March 2014184
February 2014207
January 2014208
September 2013202
August 2013208
July 2013195
June 2013204
May 2013195
April 2013215
March 2013219
February 2013185
January 2013200
September 2012187
August 2012199
July 2012193
June 2012201
May 2012202
April 2012203
March 2012229
February 2012194
January 2012184
September 2011193
August 2011179
July 2011171
June 2011190
May 2011178
April 2011208
March 2011208
February 2011203
January 2011200
September 2010199
August 2010181
July 2010195
June 2010213
May 2010179
April 2010223
March 2010194
February 2010212
January 2010191
Show more
Show less
Report Abuse