• Login
  • Register
  • Zoek
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Filebase Entry
  • More Options

ICTscripters

Dé plek voor IT

Dé plek voor IT

Login

Geavanceerde opties
  1. Home
  2. Forum
    1. Alle berichten
    2. Recente activiteiten
  3. ICT Nieuws
  4. Blog
  5. Marktplaats
    1. Werk
    2. Advertenties
    3. Domeinnamen
    4. Websites
    5. Design & lay-outs
    6. Scripts
    7. Overige
  6. Design
  7. Leden
    1. Actieve bezoekers
    2. Team
    3. Leden zoeken
  8. Downloads
  9. Goedkope domeinnamen
  1. Home
  2. Forum
    1. Alle berichten
    2. Recente activiteiten
  3. ICT Nieuws
  4. Blog
  5. Marktplaats
    1. Werk
    2. Advertenties
    3. Domeinnamen
    4. Websites
    5. Design & lay-outs
    6. Scripts
    7. Overige
  6. Design
  7. Leden
    1. Actieve bezoekers
    2. Team
    3. Leden zoeken
  8. Downloads
  9. Goedkope domeinnamen
  1. Home
  2. Forum
    1. Alle berichten
    2. Recente activiteiten
  3. ICT Nieuws
  4. Blog
  5. Marktplaats
    1. Werk
    2. Advertenties
    3. Domeinnamen
    4. Websites
    5. Design & lay-outs
    6. Scripts
    7. Overige
  6. Design
  7. Leden
    1. Actieve bezoekers
    2. Team
    3. Leden zoeken
  8. Downloads
  9. Goedkope domeinnamen
  1. Dé plek voor IT - ICTscripters
  2. Forum
  3. Scripting & programmeren
  4. PHP + SQL

Forum

  • Fallen Kingdom Game

    gozmeu 27 juli 2026 om 23:49
  • Crimora.nl

    Dennii 11 juli 2026 om 13:13
  • RPG game gebouwd met AI

    zwpgangster 9 juli 2026 om 11:25
  • (Verkoop) Criminals

    Syntax 5 juli 2026 om 13:22
  • Het Grote Vibe Code Topic

    Syntax 30 juni 2026 om 11:54
  • Ictscripters Chat

    Jeffrey.Hoekman 26 juni 2026 om 16:21
  • Het oorspronkelijke Criminals Script

    Jeroen.G 24 juni 2026 om 09:21
  • StraatBaas is back, maar hoe?!

    Syntax 17 juni 2026 om 10:28

Marktplaats

  • 303 Nieuwe Domeinnamen Juli 2026

    shiga 1 augustus 2026 om 13:56
  • Straatbaas.eu – complete Nederlandstalige en Engelstalige online maffia-RPG

    Syntax 28 juli 2026 om 15:47
  • 306 Nieuwe Domeinnamen Juni 2026

    shiga 1 juli 2026 om 13:39

my sql foutmelding

  • godkiller
  • 7 maart 2014 om 21:09
  • godkiller
    Beginner
    Berichten
    9
    • 7 maart 2014 om 21:09
    • #1

    heey mensen. ik blijf maar een foutmelding krijgen bij while($aRow = mysql_fetch_assoc($rResult))
    ik weet neit wat ik fout doe wie kan me helpen
    dit is een script van een open source crime game

    PHP
    <?php
    
    
    session_start();
    ob_start();
    include("./_menu_l.php");
    ?>
    <?php
    
    
    
    
    
    
    $adds = array(	"",	"WHERE `rank`<5",	"WHERE `rank`>=5 && `rank`<12",	"WHERE `rank`>=12 && `rank`<22",	"WHERE `rank`>=22 && `rank`<47",	"WHERE `rank`>=47 && `rank`<77",	"WHERE `rank`>=77 && `rank`<110",	"WHERE `rank`>=110 && `rank`<160",	"WHERE `rank`>=160 && `rank`<260",	"WHERE `rank`>=260 && `rank`<510",	"WHERE `rank`>=510 && `rank`<860",	"WHERE `rank`>=860 && `rank`<1310",	"WHERE `rank`>=1310");$x = 0;if(isset($_GET['x']) && array_key_exists($_GET['x'], $adds)){	$add = $adds[$_GET['x']];	$add2 = "LEFT JOIN `speldata` ON `speldata`.`id`=`users`.`id` ".$add;	$x = $_GET['x'];}
    $total = mysql_query("SELECT COUNT(`users`.`id`) FROM `users` ".$add2) or ($msg_geen);$tf = mysql_result($total, 0) or ($msg_geen);
    $pp = 25;
    $pages = ceil($tf / $pp);
    
    
    if(isset($_GET['page']) && ctype_digit($_GET['page']) && $_GET['page'] >= 0 && $_GET['page'] < $pages){	$page = $_GET['page'];} else {	$page = 0;}
    if(!isset($_GET['page'])){	$score = getScore(ID);	$page = floor($score / $pp);}
    
    
    $start = $page * $pp;
    $sql = mysql_query("SELECT `username`, `users`.`id`, `bankmoney`+`cashmoney` AS `money`, `leven`, `rank`, `naam` FROM `speldata` 					LEFT JOIN `familie` ON `familie`.`id` =`speldata`.`familie_id`					LEFT JOIN `users` ON `users`.`id`=`speldata`.`id`                   			LEFT JOIN `status` ON `status`.`id`=`speldata`.`id`									".$add."						ORDER BY `speldata`.`score` DESC					LIMIT ".$start.", ".$pp) or die("We zijn bezig met een aanpassing!");
    
    
    ?><form method="post" action="/ledenlijst.php"><table border="0" cellspacing="1" width="96%" bgcolor="#000" align="center">
    	<tr>
    		<td class="top" colspan="2">		
    			Leden		</td>
    	</tr>
    	<tr>
    			<td class="tab_on" width="50%">
    			<center><table border='0' cellspacing='0' style='margin: 0px;'>
    	<tr>
    		<td>
    			<img src='/images/icons/group.png' alt='' border='0'>
    		</td>
    		<td>
    			&nbsp;<a href="/ledenlijst.php"><b>Leden Lijst</a></b>
    		</td>
    	</tr>
    </table></center>
    		</td>
    				<td class="tab" width="50%">
    			<center><table border='0' cellspacing='0' style='margin: 0px;'>
    	<tr>
    		<td>
    			<img src='/images/icons/group_add.png' alt='' border='0'>
    		</td>
    		<td>
    			&nbsp;<a href="/online.php"><b>Online Spelers</a></b>
    		</td>
    	</tr>
    </table></center>
    		</td>
    			</tr>
    	<tr>
    		<td colspan="2" class="container">
    			<table border="0" cellspacing="1" width="96%" bgcolor="#000" align="center">
    	<tr>
    		<td class="subtop" colspan="6">		
    			Leden Lijst		</td>
    	</tr>
    	<tr>
    		<td colspan="6" class="inhoud_r">
    			Lid zoeken: <input type="text" name="lid" value="" maxlength="25" /> <input type="submit" name="search_lid" value="Zoek!" />
    		</td>
    	</tr>
    	<tr>
    		<td class="subtop" width="5%">
    			#
    		</td>
    		<td class="subtop" width="19%">
    			Naam		</td>
    		<td class="subtop" width="19%">
    			Rank		</td>
    		<td class="subtop" width="19%">
    			Geld Rank		</td>
    		<td class="subtop" width="19%">
    			Familie		</td>
    		<td class="subtop" width="19%">
    			Leven		</td>
    	</tr>
    
    
    	<?php    if(isset($_POST['search_lid'])){        	$i = 0 + 1;                $lid = $_POST['lid'];            $sqlS = mysql_query("SELECT `username`, `users`.`id`, `bankmoney`+`cashmoney` AS `money`, `leven`, `rank`, `naam` FROM `speldata` 					LEFT JOIN `familie` ON `familie`.`id` =`speldata`.`familie_id`					LEFT JOIN `users` ON `users`.`id`=`speldata`.`id`                    LEFT JOIN `status` ON `status`.`id`=`speldata`.`id`	                    WHERE `username` LIKE '".mr($lid)."%' ORDER BY `username` ASC LIMIT 0, 15 ") or die("We zijn bezig met een aanpassing!");            if($lid == ""){               $msgS = bad("Je hebt niks ingevuld!");            } elseif(mysql_num_rows($sqlS) == 0){               $msgS = bad("Er zijn geen resultaten gevonden!");            }                if(isset($msgS)){				echo "<tr>					<td class='inhoud' colspan='6'>							                ".$msgS."					</td>				</tr>";    } else {    while($resS = mysql_fetch_assoc($sqlS)){        $rnk = getRank($resS['rank']);		echo "		<tr>			<td class='inhoud_c' width='5%' style='vertical-align: middle; ".(($resS['id'] == ID) ? "background-color: #606060" : "").";'>				".$i."			</td>			<td class='inhoud' width='20%' ".(($res['id'] == ID) ? "style='background-color: #606060;'" : "").">				".cname($resS['id'], $resS['username'])."			</td>			<td class='inhoud' width='20%' ".(($resS['id'] == ID) ? "style='background-color: #606060;'" : "").">				".$rnk['rank']."			</td>			<td class='inhoud' width='20%' ".(($resS['id'] == ID) ? "style='background-color: #606060;'" : "").">				".geldrank($resS['money'])."			</td>			<td class='inhoud' width='20%' ".(($resS['id'] == ID) ? "style='background-color: #606060;'" : "").">				".(is_null($resS['naam']) ? "Geen" : "<a href='fampage.php?x=".$resS['naam']."'>".$resS['naam']."</a>")."			</td>			<td class='inhoud' width='15%' ".(($resS['id'] == ID) ? "style='background-color: #606060;'" : "").">				".createBalk($resS['leven'])."			</td>		</tr>		";		$i++;	}    }    } else {
        	$i = $start + 1;
    	while($res = mysql_fetch_assoc($sql)){
    	 	$rnk = getRank($res['rank']);		echo "		<tr>			<td class='inhoud_c' width='5%' style='vertical-align: middle; ".(($res['id'] == ID) ? "background-color: #606060" : "").";'>				".$i."			</td>			<td class='inhoud' width='20%' ".(($res['id'] == ID) ? "style='background-color: #606060;'" : "").">				".cname($res['id'], $res['username'])."			</td>			<td class='inhoud' width='20%' ".(($res['id'] == ID) ? "style='background-color: #606060;'" : "").">				".$rnk['rank']."			</td>			<td class='inhoud' width='20%' ".(($res['id'] == ID) ? "style='background-color: #606060;'" : "").">				".geldrank($res['money'])."			</td>			<td class='inhoud' width='20%' ".(($res['id'] == ID) ? "style='background-color: #606060;'" : "").">				".(is_null($res['naam']) ? "Geen" : "<a href='fampage.php?x=".$res['naam']."'>".$res['naam']."</a>")."			</td>			<td class='inhoud' width='15%' ".(($res['id'] == ID) ? "style='background-color: #606060;'" : "").">				".createBalk($res['leven'])."			</td>		</tr>		";		$i++;	}if(mysql_num_rows($sql) == "0"){echo"<tr><td class='inhoud' colspan='6'>";echo bad("Spelers hebben deze rank nog niet!");echo "</td></tr>";}}?>		</table>					</td>
    				</tr>
    				</table>
    	<br />
    	<table border="0" cellspacing="1" width="96%" bgcolor="#000" align="center">
    		<tr>
    			<td class="inhoud_c" width="33%" colspan="2">
    			<select onChange='location="ledenlijst.php?page=<?=$page;?>&x=" + this.value'>				<?php								$options = array("Allemaal", "Scum", "Pee Wee", "Thug", "Gangster", "Hitman", "Assassin", "Boss", 									"Godfather", "Legendary Godfather", "Don", "Respectable Don", "Legendary Don");								foreach($options AS $k => $name){					if($k == $x){						echo "<option value='".$k."' selected='selected'>".$name."</option>";					} else {						echo "<option value='".$k."'>".$name."</option>";					}				}				?>			</select></td>
    			<td class="inhoud_c" width="33%" colspan="2">
    			<select onChange='location="ledenlijst.php?x=<?=$x;?>&page=" + this.value'>			<?php			for($j = 0; $j < $pages; $j++){			 	if($j == $page){					echo "<option value='".$j."' selected='selected'>".($j + 1)."</option>";				} else {					echo "<option value='".$j."'>".($j + 1)."</option>";				}				}			?>			</select>			</td>
    			<td class="inhoud_c" width="33%" colspan="2">
    			<a href='ledenlijst.php?page=0&x=<?=$x;?>'>Top <b>25</b></a>			</td>
    		</tr>
    	</table>		</td>
    	</tr>
    
    
    
    
    <? include ("_menu_r.php"); ?>
    Toon Meer

    Bewerkt één keer, laatst door godkiller (7 maart 2014 om 22:06).

  • Reza
    Professional
    Ontvangen Reacties
    13
    Berichten
    1.536
    • 7 maart 2014 om 21:53
    • #2

    Zou je de foutmelding kunnen posten, graag ook met regelnummer.

    Waarschijnlijk kan er geen resultaat opgehaald worden en daarom krijg je met fetch_assoc() een foutmelding.

    Met vriendelijke groet,
    Reza.

  • godkiller
    Beginner
    Berichten
    9
    • 7 maart 2014 om 22:05
    • #3

    HEEY,

    hij geeft nu een andere foutmelding weer.

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

    hoe los ik dat op

  • Reza
    Professional
    Ontvangen Reacties
    13
    Berichten
    1.536
    • 7 maart 2014 om 22:23
    • #4
    Citaat van godkiller

    HEEY,

    hij geeft nu een andere foutmelding weer.

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

    hoe los ik dat op

    Als je de desbetreffende code geeft kunnen we je helpen, verder is je huidige code erg onoverzichtelijk en ook nog eens 'ouderwets'.

    Met vriendelijke groet,
    Reza.

  • godkiller
    Beginner
    Berichten
    9
    • 7 maart 2014 om 22:30
    • #5

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

    dit is de foutmelding die hij geeft als ik dit script upload.
    ik weet uberhaubt niet waar het aan ligt
    waar zou ik dit kunnen vinden dan zou ik de code kunnen vinden zodat jullie me kunnen helpen

Participate now!

Heb je nog geen account? Registreer je nu en word deel van onze community!

Maak een account aan Login

ICT Nieuws

  • Quanscient ontvangt €10M om AI- en kwantum-native hardware engineering te bevorderen - Tech.eu

    ICTscripters 27 mei 2026 om 12:03
  • Datalek bij leverancier Canvas - Universiteit van Amsterdam

    ICTscripters 10 mei 2026 om 12:03
  • Data privacy in 2026: Hoe de naleving van GDPR verandert

    ICTscripters 8 mei 2026 om 12:16

Blogs

  • Functioneel ontwerp

    Dees 28 december 2014 om 12:38
  • Access Control List implementatie in PHP/MySQL - deel 1/2

    FangorN 28 december 2018 om 12:35
  • Access Control List implementatie in PHP/MySQL - deel 2/2

    FangorN 29 december 2018 om 12:37
  1. Marktplaats
  2. Design
  3. Voorwaarden
  4. Ons team
  5. Leden
  6. Geschiedenis
  7. Regels
  8. Links
  9. Privacy Policy
ICTscripters ©2005 - 2026 , goedkope hosting door DiMoWeb.com, BE0558.915.582
Sponsors: Beste kattenhotel provincie Antwerpen | Beste Zetes eid kaartlezer webshop
Style: Nexus by cls-design
Stylename
Nexus
Manufacturer
cls-design
Licence
Commercial styles
Help
Supportforum
Visit cls-design