CrisTany Posted September 9, 2013 Report Posted September 9, 2013 Salutare, voi prezenta 2 probleme in acest topic, una e o intrebare alta o nelamurire.Incep cu nelamurirea, lucrez la un browser based game de ceva vreme, dar asta nu conteaza deocamdata, am instalat wamp server unde lucrez, si mi sa intamplat o problema, mi-a cazut netu cateva minute, nu stiu daca e din cauza asta, si nu imi mai afiseaza datele ce le iau din baza de date:Aici trebuia sa fie afisat un titlu mare, si la fiecare rand o valoare, de ex la power: 1.De la ce poate fi problema ?Sa trecem la intrebare: credeti ca as avea sanse mari sa vand acest browser based game daca il termin ? vreau sa zic la un pret bun nu la 100 - 200 de dolari, il voi face destul de complex si o interfata foarte faina.Astept pareri. Quote
CrisTany Posted September 9, 2013 Author Report Posted September 9, 2013 da sunt datele in db, nu afiseaza nimic. Quote
sclipici Posted September 9, 2013 Report Posted September 9, 2013 (edited) Arata-ne query, partea aia din script, sange ceva? Edited September 9, 2013 by sclipici Quote
CrisTany Posted September 9, 2013 Author Report Posted September 9, 2013 //select user id$query = "SELECT admin, id FROM users WHERE email = '".$_SESSION['email']."'";$row = mysqli_query($connect, $query);$key = mysqli_fetch_assoc($row);//select country stats$fo = "SELECT * FROM states WHERE leader = '".$key['id']."' ";$xo = mysqli_query($connect, $fo);$yo = mysqli_fetch_assoc($xo);Nu asta este problema, inainte mergea perfect, acuma nu mai merge. Nu cred ca problema este la cod. Quote
Active Members dancezar Posted September 9, 2013 Active Members Report Posted September 9, 2013 //select user idif(!$connect){echo 'Nu sunt conectat!';exit;}$query = "SELECT admin, id FROM users WHERE email = '".$_SESSION['email']."'";$row = mysqli_query($connect, $query);if($row)$key = mysqli_fetch_assoc($row);elseecho mysql_error();//select country stats$fo = "SELECT * FROM states WHERE leader = '".$key['id']."' ";$xo = mysqli_query($connect, $fo);$yo = mysqli_fetch_assoc($xo); ce erori afiseaza? Quote
EAdrian Posted September 9, 2013 Report Posted September 9, 2013 //select user id$query = "SELECT admin, id FROM users WHERE email = '".$_SESSION['email']."'";$row = mysqli_query($connect, $query);$key = mysqli_fetch_assoc($row);//select country stats$fo = "SELECT * FROM states WHERE leader = '".$key['id']."' ";$xo = mysqli_query($connect, $fo);$yo = mysqli_fetch_assoc($xo);Nu asta este problema, inainte mergea perfect, acuma nu mai merge. Nu cred ca problema este la cod.Bag? log întotdeauna pe sesiuni, vezi dac? e activ?...?i câteva sfaturi.. încearc? s? evi?i s? tot faci variabile atunci când este posibil, de exemplu//select user id$query = "SELECT admin, id FROM users WHERE email = '".$_SESSION['email']."'";$row = mysqli_query($connect, $query);$key = mysqli_fetch_assoc($row);//select country stats$fo = "SELECT * FROM states WHERE leader = '".$key['id']."' ";$xo = mysqli_query($connect, $fo);$yo = mysqli_fetch_assoc($xo);in$fetch_key = mysqli_fetch_assoc(mysqli_query($connect, "SELECT `admin`, `id` FROM `users` WHERE `email` = '".$_SESSION['email']."'"));$yo = mysqli_fetch_assoc(mysqli_query($connect, "SELECT * FROM `states` WHERE `leader` = '".$key['id']."'")); Quote
CrisTany Posted September 9, 2013 Author Report Posted September 9, 2013 (edited) //select user idif(!$connect){echo 'Nu sunt conectat!';exit;}$query = "SELECT admin, id FROM users WHERE email = '".$_SESSION['email']."'";$row = mysqli_query($connect, $query);if($row)$key = mysqli_fetch_assoc($row);elseecho mysql_error();//select country stats$fo = "SELECT * FROM states WHERE leader = '".$key['id']."' ";$xo = mysqli_query($connect, $fo);$yo = mysqli_fetch_assoc($xo); ce erori afiseaza?nimic incerc sa reinstalez wamp-ul, sa vedem ce se intampla.EDIT: am reinstalat wampul, tot nimic. Care poate fi problema ? am verificat de mai multe ori sa nu fi sters ceva din greseala, dar e totul la fel.EDIT2: am incercat de pe alt browser, si se afiseaza .. folosesc google chrome dar pe IE apare. Problema ? Edited September 9, 2013 by CrisTany Quote
emi5893 Posted September 9, 2013 Report Posted September 9, 2013 Goleste cacheul si incearca din nou Quote
CrisTany Posted September 9, 2013 Author Report Posted September 9, 2013 am rezolvat, merge acuma.Faza e ca l-am golit cand mi-a cazut netu, chiar nu stiu care a fost faza aici.Daca mai exista pareri, puteti sa le dati in legatura cu a doua intrebare.Multumesc Quote