Phorum.ro
Your Avatar Welcome to Phorum.ro!
If you haven't registered yet, click here!
Attention Visitor:
You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
Du-te înapoi   Phorum.ro > Web Design & Web Development > Programare > PHP > PHP DB

PHP DB Discutii despre lucrul cu baze de date in PHP.

Răspunde
 
Thread Tools Moduri de afișare
Vechi 06.11.2007   #1
DeBaRaSoR
8-Bit Member
 
DeBaRaSoR's Avatar
 
Data înregistrării: 06.11.2007
Mesaje: 4
Rep Power: 5
DeBaRaSoR is on a distinguished road
Implicit mesaj de eroare in conexiunea cu sql

Salutare, am si eu o problema , poate aveti ideea despre ce este vorba ...

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

Curios este faptul ca pe localhost merge perfect scriptul, dar pe web imi da eroarea asta .
Ma poate ajuta cineva?
DeBaRaSoR is offline   Reply With Quote
Sponsored Links
Vechi 07.11.2007   #2
BETng4U
64-Bit member
 
BETng4U's Avatar
 
Data înregistrării: 21.02.2006
Locație: 127.0.0.1 - barlad
Vârsta: 23
Mesaje: 334
Rep Power: 6
BETng4U is on a distinguished road
Trimite un mesaj prin Yahoo pentru BETng4U
Implicit

posteaza si interogarea folosita.
altfel nu vad cum putem sa te ajutam.
BETng4U is offline   Reply With Quote
Vechi 07.11.2007   #3
DeBaRaSoR
8-Bit Member
 
DeBaRaSoR's Avatar
 
Data înregistrării: 06.11.2007
Mesaje: 4
Rep Power: 5
DeBaRaSoR is on a distinguished road
Implicit

Cod PHP:
<?php
include("config.php");

if (isset( 
$_GET['go']))
{
    if (
$_GET['go']=='cool')
     {
        
$query="UPDATE tabel1 SET cool=cool+1 WHERE id=".$_GET['id'];
        
mysql_query($query);
        
    }
    if (
$_GET['go']=='nashpa')
     {
        
$query="UPDATE tabel1 SET nashpa=nashpa+1 WHERE id=".$_GET['id'];
        
mysql_query($query);
        
    }
}
else
{
$query="UPDATE tabel1 SET vizualizari=vizualizari+1 WHERE id=".$_GET['id'];
mysql_query($query);
}

$query="SELECT * FROM tabel1 WHERE id=".$_GET['id'];
$result=mysql_query($query) or die(mysql_error( ));
while(
$rand mysql_fetch_array($result))
{
   
$id=$rand["id"];
   
$nume=$rand["nume"];   
   
$prenume=$rand["prenume"];  
   
$cool=$rand["cool"];
   
$nashpa=$rand["nashpa"]; 
   
$vizualizari=$rand["vizualizari"]; 

}
?>
DeBaRaSoR is offline   Reply With Quote
Vechi 07.11.2007   #4
DeBaRaSoR
8-Bit Member
 
DeBaRaSoR's Avatar
 
Data înregistrării: 06.11.2007
Mesaje: 4
Rep Power: 5
DeBaRaSoR is on a distinguished road
Implicit

Am rezolvat problema , greseala pe care o faceam era ca nu trimiteam bine din index.php in view.php

Rog scuzati pentru deranj

va multumesc fain oricum !
DeBaRaSoR is offline   Reply With Quote
Răspunde


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Moduri de afișare

Reguli de postare
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Pornit
emoticoanele sunt Pornit
Codul [IMG] este Pornit
Codul HTML este Oprit



Ora este GMT +3. Ora este acum 15:50:49.


Rulează cu: vBulletin Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Forum SEO by Zoints

XXXXXXXXXXXXXXXXXXX
Inactive Reminders By Icora Web Design