View Single Post
ישן 30-08-08, 19:40   # 6
bilopay
חסום
 
מיני פרופיל
תאריך הצטרפות: Aug 2008
הודעות: 452

bilopay לא מחובר  

זה לא עובד זה נותן תשגיעה:
PHP קוד:
Mysql ErrorYou have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near 'table WHERE id='1'' at line 1 
זה הקוד של השליפה:
PHP קוד:
<?
$id
="1";
$link mysql_connect('localhost' 'root' '') or die('Mysql Error: ' mysql_error());  
mysql_select_db('bar_manor' $link) or die('Mysql Error: ' mysql_error());  
  
$query  "SELECT * FROM table WHERE id='$id'"
$Result mysql_query($query) or die('Mysql Error: ' mysql_error()); 
$N mysql_num_rows($Result);
if(
$N === false
die(
'Mysql Error: ' mysql_error()); 
if (
$N 1
    echo 
'NO RESULTS'
else 

    while(
$Liner mysql_fetch_assoc($Result)) 
    { 
        
              
echo 
$Liner["text"]; 

        
       
    } 

mysql_free_result($Result) or die('Mysql Error: ' mysql_error()); 
// סוגר את החיבור לבסיס הנתונים   
mysql_close($link)         or die('Mysql Error: ' mysql_error()); 
?>

Last edited by bilopay; 30-08-08 at 19:43..
  Reply With Quote