O mana de ajutor...nu e greu pt altii

Secţiune dedicată începatorilor.

Moderatori: Moderatori, Start Moderator

scorillo
PHPRomania Supporter
Mesaje: 12
Membru din: Dum Mar 23, 2008 12:53 pm

O mana de ajutor...nu e greu pt altii

Mesajde scorillo » Joi Iul 10, 2008 2:32 pm

Am asa
$mail=($_SESSION['MM_Username'])
//linia de mai jos e 106
$query_Recordset1 = "SELECT data FROM users WHERE =" . $mail;



rezulta eroarea asta
Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\vector\software\main_user_cp.php on line 106


Va multumesc



johnel
PHPRomania Supporter
Mesaje: 24
Membru din: Lun Aug 27, 2007 5:55 pm
Localitate: Bucuresti
Contact:

NU stiu daca e bine asa ca nu am testat

Mesajde johnel » Joi Iul 10, 2008 2:53 pm

Pai la prima vedere sunt 2 greseli, dar e posibil sa gresesc si eu, pentru ca nu am testat nimic.
1. Tabelul din care selectezi trebuie pus intre ``;
2. ai pus WHERE =" . $mail; - dar where ce e egal cu $mail?

Trebuie sa ai ceva de genul:
$qry = "SELECT `data` FROM `users` WHERE `email `= ".$mail;

Avatar utilizator
mihaitha
Senior Member
Mesaje: 2383
Membru din: Vin Mai 04, 2007 12:40 pm
Localitate: Sibiu
Contact:

Mesajde mihaitha » Joi Iul 10, 2008 3:09 pm

De erorile evidentiate de johnel urma sa te lovesti mai tarziu, odata ce rezolvai problema ta.

In alta ordine de idei, eroarea in cauza iti apare pentru ca nu ai pus ; la finalul liniei 105 ($mail=($_SESSION['MM_Username'])). De retinut: oricare doua instructiuni consecutive, in php, trebuie separate cu ; indiferent daca se afla pe aceeasi linie sau pe linii diferite!

P.S. johnel, cu punctul 2 ai nimerit-o. Ce ai spus la punctul 1 nu e obligatoriu, doar recomandat.

scorillo
PHPRomania Supporter
Mesaje: 12
Membru din: Dum Mar 23, 2008 12:53 pm

Mesajde scorillo » Joi Iul 10, 2008 3:13 pm

mysql_select_db($database_vectorix, $vectorix);
$mail=($_SESSION['MM_Username']);
$query_Recordset1 ="SELECT `data` FROM `users` WHERE `email` = " .$mail;

$Recordset1 = mysql_query($query_Recordset1, $vectorix) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);

acum imi da
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 'juma de adresa' at line 1

Avatar utilizator
mihaitha
Senior Member
Mesaje: 2383
Membru din: Vin Mai 04, 2007 12:40 pm
Localitate: Sibiu
Contact:

Mesajde mihaitha » Joi Iul 10, 2008 3:18 pm


scorillo
PHPRomania Supporter
Mesaje: 12
Membru din: Dum Mar 23, 2008 12:53 pm

Mesajde scorillo » Joi Iul 10, 2008 3:27 pm


scorillo
PHPRomania Supporter
Mesaje: 12
Membru din: Dum Mar 23, 2008 12:53 pm

Mesajde scorillo » Joi Iul 10, 2008 3:38 pm


johnel
PHPRomania Supporter
Mesaje: 24
Membru din: Lun Aug 27, 2007 5:55 pm
Localitate: Bucuresti
Contact:

Spune-ne mai exact cum e construita tabela

Mesajde johnel » Joi Iul 10, 2008 3:48 pm


scorillo
PHPRomania Supporter
Mesaje: 12
Membru din: Dum Mar 23, 2008 12:53 pm

Mesajde scorillo » Joi Iul 10, 2008 4:03 pm


johnel
PHPRomania Supporter
Mesaje: 24
Membru din: Lun Aug 27, 2007 5:55 pm
Localitate: Bucuresti
Contact:

Pai nus tiu exact ce vrei tu sa faci

Mesajde johnel » Joi Iul 10, 2008 4:13 pm


alin4lex
Average Member
Mesaje: 124
Membru din: Mie Iun 01, 2005 9:38 am
Localitate: Bucuresti
Contact:

Mesajde alin4lex » Joi Iul 10, 2008 4:27 pm


scorillo
PHPRomania Supporter
Mesaje: 12
Membru din: Dum Mar 23, 2008 12:53 pm

Mesajde scorillo » Joi Iul 10, 2008 4:36 pm


yorsol
Average Member
Mesaje: 50
Membru din: Mie Aug 09, 2006 4:23 am
Contact:

Mesajde yorsol » Sâm Iul 12, 2008 7:23 am

DESIGN EFFECT


Înapoi la “PHP Incepători”

Cine este conectat

Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 20 vizitatori