SLOTJE bubble script MySQL error

Gestart doorRobbert48 reacties110 weergaven

49 berichten · pagina 1 van 4

Robbert

Lid · Topicstarter

Berichten
9.969
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Heu,
Erik is bezig geweest met een bubble script,
alleen nu is er een irritante error waardoor zelf Firefox van vast loopt yummiedit is de error:

Warning: mysql_fetch(): supplied argument is not a valid MySQL result resource in /bubble.php on line 34

en dan nu de code:

[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]../_include.php[/COLOR][COLOR= #007700]);[/COLOR]
design_boven[COLOR= #007700]([/COLOR][COLOR= #DD0000]Bubble[/COLOR][COLOR= #007700]);[/COLOR]
check_login[COLOR= #007700]();[/COLOR]
[COLOR= #0000BB]$bubble_query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM bubbles"[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$kliks_query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT kliks FROM bubbles"[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$kliks[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$kliks_query[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$in_pot[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$kliks[/COLOR] [COLOR= #007700]*[/COLOR] [COLOR= #0000BB]90[/COLOR][COLOR= #007700];[/COLOR]
?>
<h2>Bubble</h2>
<p>
    Dit is de bubble van hoi.net. Een bubble kost 1 klik.<br />
    90% Procent van alle bubbles gaat in de pot. 10% Gaat naar Klikker.net.<br />
    Er zijn [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bubble_query[/COLOR][COLOR= #007700]);[/COLOR] ?> bubbles in de run, en er zitten [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$in_pot[/COLOR][COLOR= #007700];[/COLOR] ?> kliks in de pot.<br /><br />
    
    <table width="100%">
        <tr>
            <td>
                Gebruikersnaam:
            </td>
            <td>
                Inzet:
            </td>
            <td>
                Uitbetaling:
            </td>
        </tr>
[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bubble_query[/COLOR][COLOR= #007700]) >[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
{[/COLOR]
    [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bubble_row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bubble_query[/COLOR][COLOR= #007700]))
    {[/COLOR]
        [COLOR= #0000BB]$lid_query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT users WHERE id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$bubble_row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]lid_id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]

        [COLOR= #0000BB]$lid_row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$lid_query[/COLOR][COLOR= #007700]);[/COLOR]
?>
        <tr>
            <td>
                [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$lid_row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]];[/COLOR] ?>
            </td>
            <td>
                [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$bubble_row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]kliks[/COLOR][COLOR= #007700]];[/COLOR] ?>
            </td>
            <td>
                [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$bubble_row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uitbetaling[/COLOR][COLOR= #007700]];[/COLOR] ?>
            </td>
        </tr>
[COLOR= #0000BB]<?[/COLOR]
    [COLOR= #007700]}
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
?>
    Er zijn nog geen bubbles in de run.
[COLOR= #0000BB]<?[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
    <a href="koop_bubbles.php">Koop een bubble!</a>
</p>
[COLOR= #0000BB]<?[/COLOR]
design_onder[COLOR= #007700]([/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]);[/COLOR]
?>


ik hoop dat jullie hier raad mee weten,
ohja: een add is er nog niet (om een bubble toe te voegen) deze heb ik met phpmyadmin toegevoegd.

@berichtjes, toegevoegt, maar nog steeds dezelfde fout yummie
0
Berichten
1.160
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
$lid_query = mysql_query("SELECT users WHERE id = ".$bubble_row[lid_id].");
0
Erik

Lid

Berichten
7.109
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Zoals ik dat deed kan ook volgens mij.. winkPS. Robbert, test dat dan is. emo
0
Berichten
1.160
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Als je buiten quotes gaat ook er weer in gaan hè yummie
0
Erik

Lid

Berichten
7.109
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Maar als het goed is kan dat ook op mijn manier, maar weet niet meer zeker.
0
Berichten
1.160
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php
$lid_id[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$bubble_row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]lid_id[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$lid_query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR]"SELECT users WHERE id [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]$lid_id[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #FF8000]//Maar altijd buiten quotes doen.. Dus dit is slecht.[/COLOR]
?>
0
Miel

Lid

Berichten
4.462
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Moet $in_pot = $kliks * 90; niet $in_pot = ($kliks / 90); worden?
En maak van die query ff dit:

$lid_query = mysql_query("SELECT users WHERE id = ".$bubble_row[lid_id]."");

//Voor die ubb parser.
0
Robbert

Lid · Topicstarter

Berichten
9.969
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
gedaan,
werkt alleen nog steeds niet,
ps; klopt dit wel tot wat hij oproept:
Afbeelding
0
Miel

Lid

Berichten
4.462
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
O, lol, deze query klopt helemaal niet:

$lid_query = mysql_query("SELECT users WHERE id = ".$bubble_row[lid_id]."");


Moet iets worden als:

$lid_query = mysql_query("SELECT id FROM users WHERE id = ".$bubble_row[lid_id]."");
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ja, hij was wat hij wou selecteren en from vergeten
zoals anubisfan al zegt

het word dus dit:

$lid_query = mysql_query("SELECT user FROM users WHERE id = ".$bubble_row[lid_id]."");
0
Robbert

Lid · Topicstarter

Berichten
9.969
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Anubisfan:
O, lol, deze query klopt helemaal niet:

$lid_query = mysql_query("SELECT users WHERE id = ".$bubble_row[lid_id]."");


Moet iets worden als:

$lid_query = mysql_query("SELECT id FROM users WHERE id = ".$bubble_row[lid_id]."");


hij geeft iig niet meer de grote waslijst aan errors,
alleen nu is de laadtijd rond de 10 minuten en is hij nog niet geladen, missschien kan erik even kijken naar die pagina, ohwja; en hij show ook niet de 1e bubble
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Ik zal wel eens kieken.. ;P
kun je deze eens uitvoeren (en de error doorgeven):

[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]../_include.php[/COLOR][COLOR= #007700]);[/COLOR]
design_boven[COLOR= #007700]([/COLOR][COLOR= #DD0000]Bubble[/COLOR][COLOR= #007700]);[/COLOR]
check_login[COLOR= #007700]();[/COLOR]
[COLOR= #0000BB]$bubble_query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM bubbles"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$kliks_query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT kliks FROM bubbles"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$kliks[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$kliks_query[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$in_pot[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$kliks[/COLOR] [COLOR= #007700]*[/COLOR] [COLOR= #0000BB]90[/COLOR][COLOR= #007700];[/COLOR]
?>
<h2>Bubble</h2>
<p>
    Dit is de bubble van hoi.net. Een bubble kost 1 klik.<br />
    90% Procent van alle bubbles gaat in de pot. 10% Gaat naar Klikker.net.<br />
    Er zijn [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bubble_query[/COLOR][COLOR= #007700]);[/COLOR] ?> bubbles in de run, en er zitten [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$in_pot[/COLOR][COLOR= #007700];[/COLOR] ?> kliks in de pot.<br /><br />
    
    <table width="100%">
        <tr>
            <td>
                Gebruikersnaam:
            </td>
            <td>
                Inzet:
            </td>
            <td>
                Uitbetaling:
            </td>
        </tr>
[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bubble_query[/COLOR][COLOR= #007700]) >[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
{[/COLOR]
    [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bubble_row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bubble_query[/COLOR][COLOR= #007700]))
    {[/COLOR]
        [COLOR= #0000BB]$lid_query[/COLOR] [COLOR= #007700]=[/COLOR] lid_query [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT user FROM users WHERE id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$bubble_row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]lid_id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR] or [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]

        [COLOR= #0000BB]$lid_row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$lid_query[/COLOR][COLOR= #007700]);[/COLOR]
?>
        <tr>
            <td>
                [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$lid_row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]];[/COLOR] ?>
            </td>
            <td>
                [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$bubble_row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]kliks[/COLOR][COLOR= #007700]];[/COLOR] ?>
            </td>
            <td>
                [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$bubble_row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uitbetaling[/COLOR][COLOR= #007700]];[/COLOR] ?>
            </td>
        </tr>
[COLOR= #0000BB]<?[/COLOR]
    [COLOR= #007700]}
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
?>
    Er zijn nog geen bubbles in de run.
[COLOR= #0000BB]<?[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
    <a href="koop_bubbles.php">Koop een bubble!</a>
</p>
[COLOR= #0000BB]<?[/COLOR]
design_onder[COLOR= #007700]([/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]);[/COLOR]
?>


Dan gaan we een voor een de sql errors bekijken =]
0
Robbert

Lid · Topicstarter

Berichten
9.969
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Guildjuhh:
Ik zal wel eens kieken.. ;P

ohja;
hij moet de username uit de tabel users halen d.m.v. de id,
en dan de rij users
0
Robbert

Lid · Topicstarter

Berichten
9.969
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Guildjuhh:
Ik zal wel eens kieken.. ;P
kun je deze eens uitvoeren (en de error doorgeven):

[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]../_include.php[/COLOR][COLOR= #007700]);[/COLOR]
design_boven[COLOR= #007700]([/COLOR][COLOR= #DD0000]Bubble[/COLOR][COLOR= #007700]);[/COLOR]
check_login[COLOR= #007700]();[/COLOR]
[COLOR= #0000BB]$bubble_query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM bubbles"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$kliks_query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT kliks FROM bubbles"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$kliks[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$kliks_query[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$in_pot[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$kliks[/COLOR] [COLOR= #007700]*[/COLOR] [COLOR= #0000BB]90[/COLOR][COLOR= #007700];[/COLOR]
?>
<h2>Bubble</h2>
<p>
    Dit is de bubble van hoi.net. Een bubble kost 1 klik.<br />
    90% Procent van alle bubbles gaat in de pot. 10% Gaat naar Klikker.net.<br />
    Er zijn [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bubble_query[/COLOR][COLOR= #007700]);[/COLOR] ?> bubbles in de run, en er zitten [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$in_pot[/COLOR][COLOR= #007700];[/COLOR] ?> kliks in de pot.<br /><br />
    
    <table width="100%">
        <tr>
            <td>
                Gebruikersnaam:
            </td>
            <td>
                Inzet:
            </td>
            <td>
                Uitbetaling:
            </td>
        </tr>
[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bubble_query[/COLOR][COLOR= #007700]) >[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
{[/COLOR]
    [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bubble_row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bubble_query[/COLOR][COLOR= #007700]))
    {[/COLOR]
        [COLOR= #0000BB]$lid_query[/COLOR] [COLOR= #007700]=[/COLOR] lid_query [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT user FROM users WHERE id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$bubble_row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]lid_id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR] or [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]

        [COLOR= #0000BB]$lid_row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$lid_query[/COLOR][COLOR= #007700]);[/COLOR]
?>
        <tr>
            <td>
                [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$lid_row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]];[/COLOR] ?>
            </td>
            <td>
                [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$bubble_row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]kliks[/COLOR][COLOR= #007700]];[/COLOR] ?>
            </td>
            <td>
                [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$bubble_row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uitbetaling[/COLOR][COLOR= #007700]];[/COLOR] ?>
            </td>
        </tr>
[COLOR= #0000BB]<?[/COLOR]
    [COLOR= #007700]}
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
?>
    Er zijn nog geen bubbles in de run.
[COLOR= #0000BB]<?[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
    <a href="koop_bubbles.php">Koop een bubble!</a>
</p>
[COLOR= #0000BB]<?[/COLOR]
design_onder[COLOR= #007700]([/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]);[/COLOR]
?>


Dan gaan we een voor een de sql errors bekijken =]

heb jouwe even geprobeert:
Parse error: syntax error, unexpected = inbubble.php on line 34
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Oopz sorry =]

[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]../_include.php[/COLOR][COLOR= #007700]);[/COLOR]
design_boven[COLOR= #007700]([/COLOR][COLOR= #DD0000]Bubble[/COLOR][COLOR= #007700]);[/COLOR]
check_login[COLOR= #007700]();[/COLOR]
[COLOR= #0000BB]$bubble_query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM bubbles"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$kliks_query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT kliks FROM bubbles"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$kliks[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$kliks_query[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$in_pot[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$kliks[/COLOR] [COLOR= #007700]*[/COLOR] [COLOR= #0000BB]90[/COLOR][COLOR= #007700];[/COLOR]
?>
<h2>Bubble</h2>
<p>
    Dit is de bubble van hoi.net. Een bubble kost 1 klik.<br />
    90% Procent van alle bubbles gaat in de pot. 10% Gaat naar Klikker.net.<br />
    Er zijn [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bubble_query[/COLOR][COLOR= #007700]);[/COLOR] ?> bubbles in de run, en er zitten [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$in_pot[/COLOR][COLOR= #007700];[/COLOR] ?> kliks in de pot.<br /><br />
    
    <table width="100%">
        <tr>
            <td>
                Gebruikersnaam:
            </td>
            <td>
                Inzet:
            </td>
            <td>
                Uitbetaling:
            </td>
        </tr>
[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bubble_query[/COLOR][COLOR= #007700]) >[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
{[/COLOR]
    [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bubble_row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bubble_query[/COLOR][COLOR= #007700]))
    {[/COLOR]
        [COLOR= #0000BB]$lid_query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT user FROM users WHERE id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$bubble_row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]lid_id[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR] or [URL="http://www.php.net/die"]die[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]

        [COLOR= #0000BB]$lid_row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$lid_query[/COLOR][COLOR= #007700]);[/COLOR]
?>
        <tr>
            <td>
                [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$lid_row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]];[/COLOR] ?>
            </td>
            <td>
                [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$bubble_row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]kliks[/COLOR][COLOR= #007700]];[/COLOR] ?>
            </td>
            <td>
                [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$bubble_row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uitbetaling[/COLOR][COLOR= #007700]];[/COLOR] ?>
            </td>
        </tr>
[COLOR= #0000BB]<?[/COLOR]
    [COLOR= #007700]}
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
?>
    Er zijn nog geen bubbles in de run.
[COLOR= #0000BB]<?[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
    <a href="koop_bubbles.php">Koop een bubble!</a>
</p>
[COLOR= #0000BB]<?[/COLOR]
design_onder[COLOR= #007700]([/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]);[/COLOR]
?>
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren