Jump to content
php.lv forumi

Recommended Posts

Posted (edited)

Manam torrentam lec errors

 

SQL Error

Unknown column 'ip' in 'where clause'

 

in C:\Program Files\xampp\htdocs\include\bittorrent.php, line 256

 

 

 

Šeit it tā 256 līnija

$res = mysql_query("SELECT * FROM bans WHERE ip = $nip") or sqlerr(__FILE__, __LINE__);

Edited by Creat1ve
Posted

to rindiņu aizstāj ar šito rindiņu

 

$res = mysql_query("SELECT * FROM bans WHERE ip = '$nip'") or sqlerr(__FILE__, __LINE__);

Posted

Nesanāk! Tapat tas errors

 

SQL Error

Unknown column 'ip' in 'where clause'

 

in C:\Program Files\xampp\htdocs\include\bittorrent.php, line 256

Posted (edited)
to rindiņu aizstāj ar šito rindiņu

 

$res = mysql_query("SELECT * FROM bans WHERE ip = '$nip'") or sqlerr(__FILE__, __LINE__);

 

tas neatrisina problēmu, ka tabulā nav kolonnas.

 

un pareizi būtu

 

$res = mysql_query("SELECT * FROM bans WHERE ip = '".$nip."' ") or ...

Edited by n0r3k
Posted

n0r3k, ko noziimee "pareizi" ? Vai tad viņa variants nestrādātu ?

 

PS. Man pasham ari labaak patiik izdaliit mainiigos no stringa, bet tas jau nenoziimee, ka tas ir pareizais veids un visi citi - nepareizi.

×
×
  • Create New...