mysql_result vraag

Gestart doorFreestyle6 reacties6 weergaven

7 berichten · pagina 1 van 1

Freestyle

Lid · Topicstarter

Berichten
7.681
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
In mijn errors staat:
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /home/project/domains/script.host2earn.nl/public_html/control.php on line 49


Dat betekent toch dat dat stukje code het niet doet/bestaat?

Dus welke code moet ik dan inplaast van mysql_result doen.

voorbeeld wat ik nu heb:

[COLOR= #0000BB]<?php
$email[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_result"]mysql_result[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT email FROM users WHERE id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruiker[/COLOR][COLOR= #007700]]),[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]);[/COLOR]  
?>


alvast bedankt
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
Werk gewoon met een array
0
Freestyle

Lid · Topicstarter

Berichten
7.681
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
result is dus gewoon het zelfde als een array?

(ik heb dit van een tutorialwink)

edit///
als ik result vervang door array dan doet hij het niet. (zie je aan de kleurtjes)

dus wie weet het wel?
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php
$query[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT email FROM users WHERE id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]gebruiker[/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]$email[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_result"]mysql_result[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]);[/COLOR]
?>
0
Berichten
5.957
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Je hebt een fout in je Query dump even je tabel hier.

*edit*
$email = mysql_result(mysql_query("SELECT email FROM users WHERE id = ".$_SESSION[gebruiker].""),0);

Leer hoe je variable gebruikt ...
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Zonder MySQL error hebben we niet zoveel aan een table dump emoEn zolang $_SESSION[gebruiker] numeriek is zijn die niet nodig in de query
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
mysql_result is nog steeds slechtemo$veld = mysql_fetch_assoc($query);
en dan kan je $veld[rij]; doen
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