הוסטס - פורום אחסון האתרים הגדול בישראל

הוסטס - פורום אחסון האתרים הגדול בישראל (https://hosts.co.il/forums/index.php)
-   פורום תיכנות (https://hosts.co.il/forums/forumdisplay.php?f=14)
-   -   בעיה בקוד php (https://hosts.co.il/forums/showthread.php?t=32437)

LDFIX.CO.IL 08-10-06 15:09

בעיה בקוד php
 
שלום כולם
אני בונה עכשיו אתר כדורגל עם מערכת ניהול ב- php (עוד תשמעו עליו בהמשך)
עשיתי דף לניהול טבלה של ליגת האלופות וזה הקוד שבו יש לי בעיה:

PHP קוד:

      $res1=@mysql_query("SELECT * 
FROM `championstables` WHERE id='1' AND h='1'"
); 
$row1 mysql_fetch_array($res1); 

זה הקוד שלוקח מהבסיס נתונים את המידע

HTML קוד:

<tr>
<td><INPUT type="text" name="goals11" size="5" value="<?php echo $row1['goals'] ?>"></td>
<td><INPUT type="text" name="iahas11" size="5" value="<?php echo $row1['iahas'] ?>"></td>
 <td><INPUT type="text" name="lost11" size="5" value="<?php echo $row1['lost'] ?>"></td>
 <td><INPUT type="text" name="drew11" size="5" value="<?php echo $row1['drew'] ?>"></td>
<td><INPUT type="text" name="won11" size="5" value="<?php echo $row1['won'] ?>"></td>
 <td><INPUT type="text" name="name11" size="15" value="<?php echo $row1['name'] ?>"></td>
 <td><INPUT type="text" name="id11" size="5" value="<?php echo $row1['id'] ?>"></td>
</tr>

זה הקוד של הטופס

(יחד עם החלק הזה יש עוד חלקים לבתים האחרים ולקבוצות האחרות)


כשאני נכנס לדף זה כותב את זה:
קוד:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/idan14/domains/at-f.net/public_html/site/tables/champions.php on line 43

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/idan14/domains/at-f.net/public_html/site/tables/champions.php on line 59

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/idan14/domains/at-f.net/public_html/site/tables/champions.php on line 76

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/idan14/domains/at-f.net/public_html/site/tables/champions.php on line 92

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/idan14/domains/at-f.net/public_html/site/tables/champions.php on line 109

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/idan14/domains/at-f.net/public_html/site/tables/champions.php on line 126

אצל כל המקומות האחרים זה מראה כמו שצריך, ורק במקום ראשון של כל בית זה ריק

חשוב להגיד שבהצגת הטבלה זה מראה את כולם בלי בעיה

מישהו יודע מה הבעיה פה?

Balrog 08-10-06 15:18

בוא תנסה כמה דברים.
קודם כל
את השורה
$res1=@mysql_query("SELECT *
FROM `championstables` WHERE id='1' AND h='1'");

תחליף ב:
קוד:

$res1=mysql_query("SELECT *
FROM `championstables` WHERE id='1' AND h='1'") or die (mysql_error())  ;

אממ ואולי יעזור לראות את כל הקוד, או שתציין מה יש בשורות שיש בהן שגיאות, קצת קשה להבין לאיפה מכוונת השגיאה.

Night 08-10-06 15:22

" id='1' AND h='1' "

ID ו- H הם שדות טקסט או מספר?
אם הם שדות מספר כדאי להוריד את הגרשים ( ' ) .

עריכה:
אולי הבעיה היא שהשאילתה לא מחזירה תוצאות? (בדקת אם היא מחזירה?)

O-B 08-10-06 15:25

PHP קוד:

><INPUT type="text" name="id11" size="5" value="<?=$row1['id']?>"></td>

נסה ככה

LDFIX.CO.IL 08-10-06 15:25

את כולם עשיתי char
ל- barlog
כולם אותו דבר רק עם מספר שונה

Balrog 08-10-06 15:31

בוא באמת תנסה לבדוק מה שNight אמר - תבדוק אם השאילתא מחזירה תוצאות (אם יש לך PHPMYADMIN תוכל להריץ את השאילתא ישירות ולראות מה חוזר).

בנוסף - אני מציע שתשנה את האופן שהשאילתא רשומה כמו שהסברתי בהודעה הקודמת - ככה אם תהיה שגיאה זה יידע אותך.

Elad-A 08-10-06 15:50

אם אתה רוצה להוציא את כל הרשומות תצטרך להשתמש בלולאת WHILE.

LDFIX.CO.IL 08-10-06 15:52

כבר ניסיתי את זה והכל בסדר
כמו שאמרתי גם בהצגת טבלה הכל פועל בסדר (הצגת טבלה בתוך האתר)
ורק בניהול זה לא טוב

עכשיו זה השתפר- שמתי את מה שאמרת (barlog) וזה פועל אולי זה קשור לזה
וגם שיניתי מחדש את ה- id של הכל

elad-a
בכל שאר הדברים זה פועל בסדר
לדוגמה בטבלאות של הליגה האנגלית, הספרדית..

Elad-A 08-10-06 15:54

אולי תראה לנו עוד קצת מהקוד?

LDFIX.CO.IL 08-10-06 16:09

PHP קוד:

$res1=mysql_query("SELECT * 
FROM `championstables` WHERE id='1' AND h='1'"
) or die (mysql_error())  ;

      
$res2=@mysql_query("SELECT * 
FROM `championstables` WHERE id='2' AND h='1'"
); 
$row2 mysql_fetch_array($res2);

      
$res3=@mysql_query("SELECT * 
FROM `championstables` WHERE id='3' AND h='1'"
); 
$row3 mysql_fetch_array($res3);

      
$res4=@mysql_query("SELECT * 
FROM `championstables` WHERE id='4' AND h='1'"
); 
$row4 mysql_fetch_array($res4);

$res5=mysql_query("SELECT * 
FROM `championstables` WHERE id='1' AND h='2'"
) or die (mysql_error())  ;

      
$res6=@mysql_query("SELECT * 
FROM `championstables` WHERE id='2' AND h='2'"
); 
$row6 mysql_fetch_array($res6);

      
$res7=@mysql_query("SELECT * 
FROM `championstables` WHERE id='3' AND h='2'"
); 
$row7 mysql_fetch_array($res7);

      
$res8=@mysql_query("SELECT * 
FROM `championstables` WHERE id='4' AND h='2'"
); 
$row8 mysql_fetch_array($res8);

      
$res9=@mysql_query("SELECT * 
FROM `campionstables` WHERE id='1' AND h='3'"
); 
$row9 mysql_fetch_array($res9);

      
$res10=@mysql_query("SELECT * 
FROM `championstables` WHERE id='2' AND h='3'"
); 
$row10 mysql_fetch_array($res10);

      
$res11=@mysql_query("SELECT * 
FROM `championstables` WHERE id='3' AND h='3'"
); 
$row11 mysql_fetch_array($res11);

      
$res12=@mysql_query("SELECT * 
FROM `championstables` WHERE id='4' AND h='3'"
); 
$row12 mysql_fetch_array($res12);


      
$res13=@mysql_query("SELECT * 
FROM `campionstables` WHERE id='1' AND h='4'"
); 
$row13 mysql_fetch_array($res13);

      
$res14=@mysql_query("SELECT * 
FROM `championstables` WHERE id='2' AND h='4'"
); 
$row14 mysql_fetch_array($res14);

      
$res15=@mysql_query("SELECT * 
FROM `championstables` WHERE id='3' AND h='4'"
); 
$row15 mysql_fetch_array($res15);

      
$res16=@mysql_query("SELECT * 
FROM `championstables` WHERE id='4' AND h='4'"
); 
$row16 mysql_fetch_array($res16);

      
$res17=@mysql_query("SELECT * 
FROM `campionstables` WHERE id='1' AND h='5'"
); 
$row17 mysql_fetch_array($res17);

      
$res18=@mysql_query("SELECT * 
FROM `championstables` WHERE id='2' AND h='5'"
); 
$row18 mysql_fetch_array($res18);

      
$res19=@mysql_query("SELECT * 
FROM `championstables` WHERE id='3' AND h='5'"
); 
$row19 mysql_fetch_array($res19);

      
$res20=@mysql_query("SELECT * 
FROM `championstables` WHERE id='4' AND h='5'"
); 
$row20 mysql_fetch_array($res20);


      
$res21=@mysql_query("SELECT * 
FROM `campionstables` WHERE id='1' AND h='6'"
); 
$row21 mysql_fetch_array($res21);

      
$res31=@mysql_query("SELECT * 
FROM `championstables` WHERE id='3' AND h='8'"
); 
$row31 mysql_fetch_array($res31);

      
$res32=@mysql_query("SELECT * 
FROM `championstables` WHERE id='4' AND h='8'"
); 
$row32 mysql_fetch_array($res32); 

זה הטופס
PHP קוד:

<tr>
<td></td> <td></td> <td></td> <td></td> <td></td>  <td>בית1</td> <td></td> 
</tr>
<tr>
<td><INPUT type="text" name="goals11" size="5" value="<?php echo $row1['goals'?>"></td>
<td><INPUT type="text" name="iahas11" size="5" value="<?php echo $row1['iahas'?>"></td> 
 <td><INPUT type="text" name="lost11" size="5" value="<?php echo $row1['lost'?>"></td>
 <td><INPUT type="text" name="drew11" size="5" value="<?php echo $row1['drew'?>"></td> 
<td><INPUT type="text" name="won11" size="5" value="<?php echo $row1['won'?>"></td> 
 <td><INPUT type="text" name="name11" size="15" value="<?php echo $row1['name'?>"></td>
 <td><INPUT type="text" name="id11" size="5" value="<?php echo $row1['id'?>"></td> 
</tr>
  <tr>
<td><INPUT type="text" name="goals21" size="5" value="<?php echo $row2['goals'?>"></td>
<td><INPUT type="text" name="iahas21" size="5" value="<?php echo $row2['iahas'?>"></td> 
 <td><INPUT type="text" name="lost21" size="5" value="<?php echo $row2['lost'?>"></td>
 <td><INPUT type="text" name="drew21" size="5" value="<?php echo $row2['drew'?>"></td> 
<td><INPUT type="text" name="won21" size="5" value="<?php echo $row2['won'?>"></td> 
 <td><INPUT type="text" name="name21" size="15" value="<?php echo $row2['name'?>"></td>
 <td><INPUT type="text" name="id21" size="5" value="<?php echo $row2['id'?>"></td> 
</tr>
 
<tr>
<td></td> <td></td> <td></td> <td></td> <td></td>  <td>בית2</td> <td></td> 
</tr>
<tr>
<td><INPUT type="text" name="goals12" size="5" value="<?php echo $row5['goals'?>"></td>
<td><INPUT type="text" name="iahas12" size="5" value="<?php echo $row5['iahas'?>"></td>
 <td><INPUT type="text" name="lost12" size="5" value="<?php echo $row5['lost'?>"></td> 
<td><INPUT type="text" name="drew12" size="5" value="<?php echo $row5['drew'?>"></td>
 <td><INPUT type="text" name="won12" size="5" value="<?php echo $row5['won'?>"></td> 
 <td><INPUT type="text" name="name12" size="15" value="<?php echo $row5['name'?>"></td>
 <td><INPUT type="text" name="id12" size="5" value="<?php echo $res5['id'?>"></td> 
</tr>
  <tr>
<td><INPUT type="text" name="goals22" size="5" value="<?php echo $row6['goals'?>"></td>
<td><INPUT type="text" name="iahas22" size="5" value="<?php echo $row6['iahas'?>"></td> 
 <td><INPUT type="text" name="lost22" size="5" value="<?php echo $row6['lost'?>"></td>
 <td><INPUT type="text" name="drew22" size="5" value="<?php echo $row6['drew'?>"></td> 
<td><INPUT type="text" name="won22" size="5" value="<?php echo $row6['won'?>"></td> 
 <td><INPUT type="text" name="name22" size="15" value="<?php echo $row6['name'?>"></td>
 <td><INPUT type="text" name="id22" size="5" value="<?php echo $row6['id'?>"></td> 
</tr>

<tr>
<td></td> <td></td> <td></td> <td></td> <td></td>  <td>בית3</td> <td></td> 
</tr>
<tr>
<td><INPUT type="text" name="goals13" size="5" value="<?php echo $row9['goals'?>"></td>
<td><INPUT type="text" name="iahas13" size="5" value="<?php echo $row9['iahas'?>"></td>
 <td><INPUT type="text" name="lost13" size="5" value="<?php echo $row9['lost'?>"></td> 
<td><INPUT type="text" name="drew13" size="5" value="<?php echo $row9['drew'?>"></td>
 <td><INPUT type="text" name="won13" size="5" value="<?php echo $row9['won'?>"></td> 
 <td><INPUT type="text" name="name13" size="15" value="<?php echo $row9['name'?>"></td>
 <td><INPUT type="text" name="id13" size="5" value="<?php echo $row9['id'?>"></td> 
</tr>
  <tr>
<td><INPUT type="text" name="goals23" size="5" value="<?php echo $row10['goals'?>"></td>
<td><INPUT type="text" name="iahas23" size="5" value="<?php echo $row10['iahas'?>"></td> 
 <td><INPUT type="text" name="lost23" size="5" value="<?php echo $row10['lost'?>"></td>
 <td><INPUT type="text" name="drew23" size="5" value="<?php echo $row10['drew'?>"></td> 
<td><INPUT type="text" name="won23" size="5" value="<?php echo $row10['won'?>"></td> 
 <td><INPUT type="text" name="name23" size="15" value="<?php echo $row10['name'?>"></td>
 <td><INPUT type="text" name="id23" size="5" value="<?php echo $row10['id'?>"></td> 
</tr>
  <tr>
<td><INPUT type="text" name="goals33" size="5" value="<?php echo $row11['goals'?>"></td>
<td><INPUT type="text" name="iahas33" size="5" value="<?php echo $row11['iahas'?>"></td> 
 <td><INPUT type="text" name="lost33" size="5" value="<?php echo $row11['lost'?>"></td>
 <td><INPUT type="text" name="drew33" size="5" value="<?php echo $row11['drew'?>"></td> 
<td><INPUT type="text" name="won33" size="5" value="<?php echo $row11['won'?>"></td> 
 <td><INPUT type="text" name="name33" size="15" value="<?php echo $row11['name'?>"></td>
 <td><INPUT type="text" name="id33" size="5" value="<?php echo $row11['id'?>"></td> 
</tr>
  <tr>
<td><INPUT type="text" name="goals43" size="5" value="<?php echo $row12['goals'?>"></td>
<td><INPUT type="text" name="iahas43" size="5" value="<?php echo $row12['iahas'?>"></td> 
 <td><INPUT type="text" name="lost43" size="5" value="<?php echo $row12['lost'?>"></td>
 <td><INPUT type="text" name="drew43" size="5" value="<?php echo $row12['drew'?>"></td> 
<td><INPUT type="text" name="won43" size="5" value="<?php echo $row12['won'?>"></td> 
 <td><INPUT type="text" name="name43" size="15" value="<?php echo $row12['name'?>"></td>
 <td><INPUT type="text" name="id43" size="5" value="<?php echo $row12['id'?>"></td> 
</tr>
<tr>
<td></td> <td></td> <td></td> <td></td> <td></td>  <td>בית4</td> <td></td> 
</tr>
<tr>
<td><INPUT type="text" name="goals14" size="5" value="<?php echo $row13['goals'?>"></td>
<td><INPUT type="text" name="iahas14" size="5" value="<?php echo $row13['iahas'?>"></td>
 <td><INPUT type="text" name="lost14" size="5" value="<?php echo $row13['lost'?>"></td> 
<td><INPUT type="text" name="drew14" size="5" value="<?php echo $row13['drew'?>"></td>
 <td><INPUT type="text" name="won14" size="5" value="<?php echo $row13['won'?>"></td> 
 <td><INPUT type="text" name="name14" size="15" value="<?php echo $row13['name'?>"></td>
 <td><INPUT type="text" name="id14" size="5" value="<?php echo $row13['id'?>"></td> 
</tr>
  <tr>
<td><INPUT type="text" name="goals24" size="5" value="<?php echo $row14['goals'?>"></td>
<td><INPUT type="text" name="iahas24" size="5" value="<?php echo $row14['iahas'?>"></td> 
 <td><INPUT type="text" name="lost24" size="5" value="<?php echo $row14['lost'?>"></td>
 <td><INPUT type="text" name="drew24" size="5" value="<?php echo $row14['drew'?>"></td> 
<td><INPUT type="text" name="won24" size="5" value="<?php echo $row14['won'?>"></td> 
 <td><INPUT type="text" name="name24" size="15" value="<?php echo $row14['name'?>"></td>
 <td><INPUT type="text" name="id24" size="5" value="<?php echo $row14['id'?>"></td> 
</tr>
  <tr>
<td><INPUT type="text" name="goals34" size="5" value="<?php echo $row15['goals'?>"></td>
<td><INPUT type="text" name="iahas34" size="5" value="<?php echo $row15['iahas'?>"></td> 
 <td><INPUT type="text" name="lost34" size="5" value="<?php echo $row15['lost'?>"></td>
 <td><INPUT type="text" name="drew34" size="5" value="<?php echo $row15['drew'?>"></td> 
<td><INPUT type="text" name="won34" size="5" value="<?php echo $row15['won'?>"></td> 
 <td><INPUT type="text" name="name34" size="15" value="<?php echo $row15['name'?>"></td>
 <td><INPUT type="text" name="id34" size="5" value="<?php echo $row15['id'?>"></td> 
</tr>
  <tr>
<td><INPUT type="text" name="goals44" size="5" value="<?php echo $row16['goals'?>"></td>
<td><INPUT type="text" name="iahas44" size="5" value="<?php echo $row16['iahas'?>"></td> 
 <td><INPUT type="text" name="lost44" size="5" value="<?php echo $row16['lost'?>"></td>
 <td><INPUT type="text" name="drew44" size="5" value="<?php echo $row16['drew'?>"></td> 
<td><INPUT type="text" name="won44" size="5" value="<?php echo $row16['won'?>"></td> 
 <td><INPUT type="text" name="name44" size="15" value="<?php echo $row16['name'?>"></td>
 <td><INPUT type="text" name="id44" size="5" value="<?php echo $row16['id'?>"></td> 
</tr>
<tr>
<td></td> <td></td> <td></td> <td></td> <td></td>  <td>בית5</td> <td></td> 
</tr>
<tr>
<td><INPUT type="text" name="goals15" size="5" value="<?php echo $row17['goals'?>"></td>
<td><INPUT type="text" name="iahas15" size="5" value="<?php echo $row17['iahas'?>"></td>
 <td><INPUT type="text" name="lost15" size="5" value="<?php echo $row17['lost'?>"></td> 
<td><INPUT type="text" name="drew15" size="5" value="<?php echo $row17['drew'?>"></td>
 <td><INPUT type="text" name="won15" size="5" value="<?php echo $row17['won'?>"></td> 
 <td><INPUT type="text" name="name15" size="15" value="<?php echo $row17['name'?>"></td>
 <td><INPUT type="text" name="id15" size="5" value="<?php echo $row17['id'?>"></td> 
</tr>
  <tr>
<td><INPUT type="text" name="goals25" size="5" value="<?php echo $row18['goals'?>"></td>
<td><INPUT type="text" name="iahas25" size="5" value="<?php echo $row18['iahas'?>"></td> 
 <td><INPUT type="text" name="lost25" size="5" value="<?php echo $row18['lost'?>"></td>
 <td><INPUT type="text" name="drew25" size="5" value="<?php echo $row18['drew'?>"></td> 
<td><INPUT type="text" name="won25" size="5" value="<?php echo $row18['won'?>"></td> 
 <td><INPUT type="text" name="name25" size="15" value="<?php echo $row18['name'?>"></td>
 <td><INPUT type="text" name="id25" size="5" value="<?php echo $row18['id'?>"></td> 
</tr>
<tr>
<td></td> <td></td> <td></td> <td></td> <td></td>  <td>בית6</td> <td></td> 
</tr>
  <tr>
<td><INPUT type="text" name="goals26" size="5" value="<?php echo $row22['goals'?>"></td>
<td><INPUT type="text" name="iahas26" size="5" value="<?php echo $row22['iahas'?>"></td> 
 <td><INPUT type="text" name="lost26" size="5" value="<?php echo $row22['lost'?>"></td>
 <td><INPUT type="text" name="drew26" size="5" value="<?php echo $row22['drew'?>"></td> 
<td><INPUT type="text" name="won26" size="5" value="<?php echo $row22['won'?>"></td> 
 <td><INPUT type="text" name="name26" size="15" value="<?php echo $row22['name'?>"></td>
 <td><INPUT type="text" name="id26" size="5" value="<?php echo $row22['id'?>"></td> 
</tr>
  <tr>
<td><INPUT type="text" name="goals36" size="5" value="<?php echo $row23['goals'?>"></td>
<td><INPUT type="text" name="iahas36" size="5" value="<?php echo $row23['iahas'?>"></td> 
 <td><INPUT type="text" name="lost36" size="5" value="<?php echo $row23['lost'?>"></td>
 <td><INPUT type="text" name="drew36" size="5" value="<?php echo $row23['drew'?>"></td> 
<td><INPUT type="text" name="won36" size="5" value="<?php echo $row23['won'?>"></td> 
 <td><INPUT type="text" name="name36" size="15" value="<?php echo $row23['name'?>"></td>
 <td><INPUT type="text" name="id36" size="5" value="<?php echo $row23['id'?>"></td> 
</tr>
  <tr>
<td><INPUT type="text" name="goals46" size="5" value="<?php echo $row24['goals'?>"></td>
<td><INPUT type="text" name="iahas46" size="5" value="<?php echo $row24['iahas'?>"></td> 
 <td><INPUT type="text" name="lost46" size="5" value="<?php echo $row24['lost'?>"></td>
 <td><INPUT type="text" name="drew46" size="5" value="<?php echo $row24['drew'?>"></td> 
<td><INPUT type="text" name="won46" size="5" value="<?php echo $row24['won'?>"></td> 
 <td><INPUT type="text" name="name46" size="15" value="<?php echo $row24['name'?>"></td>
 <td><INPUT type="text" name="id46" size="5" value="<?php echo $row24['id'?>"></td> 
</tr>
<tr>
<td></td> <td></td> <td></td> <td></td> <td></td>  <td>בית7</td> <td></td> 
</tr>
<tr>
<td><INPUT type="text" name="goals17" size="5" value="<?php echo $row25['goals'?>"></td>
<td><INPUT type="text" name="iahas17" size="5" value="<?php echo $row25['iahas'?>"></td>
 <td><INPUT type="text" name="lost17" size="5" value="<?php echo $row25['lost'?>"></td> 
<td><INPUT type="text" name="drew17" size="5" value="<?php echo $row25['drew'?>"></td>
 <td><INPUT type="text" name="won17" size="5" value="<?php echo $row25['won'?>"></td> 
 <td><INPUT type="text" name="name17" size="15" value="<?php echo $row25['name'?>"></td>
 <td><INPUT type="text" name="id17" size="5" value="<?php echo $row25['id'?>"></td> 
</tr>
  <tr>
<td><INPUT type="text" name="goals27" size="5" value="<?php echo $row26['goals'?>"></td>
<td><INPUT type="text" name="iahas27" size="5" value="<?php echo $row26['iahas'?>"></td> 
 <td><INPUT type="text" name="lost27" size="5" value="<?php echo $row26['lost'?>"></td>
 <td><INPUT type="text" name="drew27" size="5" value="<?php echo $row26['drew'?>"></td> 
<td><INPUT type="text" name="won27" size="5" value="<?php echo $row26['won'?>"></td> 
 <td><INPUT type="text" name="name27" size="15" value="<?php echo $row26['name'?>"></td>
 <td><INPUT type="text" name="id27" size="5" value="<?php echo $row26['id'?>"></td> 
</tr>
  <tr>
<td><INPUT type="text" name="goals37" size="5" value="<?php echo $row27['goals'?>"></td>
<td><INPUT type="text" name="iahas37" size="5" value="<?php echo $row27['iahas'?>"></td> 
 <td><INPUT type="text" name="lost37" size="5" value="<?php echo $row27['lost'?>"></td>
 <td><INPUT type="text" name="drew37" size="5" value="<?php echo $row27['drew'?>"></td> 
<td><INPUT type="text" name="won37" size="5" value="<?php echo $row27['won'?>"></td> 
 <td><INPUT type="text" name="name37" size="15" value="<?php echo $row27['name'?>"></td>
 <td><INPUT type="text" name="id37" size="5" value="<?php echo $row27['id'?>"></td> 
</tr>
  <tr>
<td><INPUT type="text" name="goals47" size="5" value="<?php echo $row28['goals'?>"></td>
<td><INPUT type="text" name="iahas47" size="5" value="<?php echo $row28['iahas'?>"></td> 
 <td><INPUT type="text" name="lost47" size="5" value="<?php echo $row28['lost'?>"></td>
 <td><INPUT type="text" name="drew47" size="5" value="<?php echo $row28['drew'?>"></td> 
<td><INPUT type="text" name="won47" size="5" value="<?php echo $row28['won'?>"></td> 
 <td><INPUT type="text" name="name47" size="15" value="<?php echo $row28['name'?>"></td>
 <td><INPUT type="text" name="id47" size="5" value="<?php echo $row28['id'?>"></td> 
</tr>
<tr>
<td></td> <td></td> <td></td> <td></td> <td></td>  <td>בית8</td> <td></td> 
</tr>
<tr>
<td><INPUT type="text" name="goals18" size="5" value="<?php echo $row29['goals'?>"></td>
<td><INPUT type="text" name="iahas18" size="5" value="<?php echo $row29['iahas'?>"></td>
 <td><INPUT type="text" name="lost18" size="5" value="<?php echo $row29['lost'?>"></td> 
<td><INPUT type="text" name="drew18" size="5" value="<?php echo $row29['drew'?>"></td>
 <td><INPUT type="text" name="won18" size="5" value="<?php echo $row29['won'?>"></td> 
 <td><INPUT type="text" name="name18" size="15" value="<?php echo $row29['name'?>"></td>
 <td><INPUT type="text" name="id18" size="5" value="<?php echo $row29['id'?>"></td> 
</tr>
  <tr>
<td><INPUT type="text" name="goals28" size="5" value="<?php echo $row30['goals'?>"></td>
<td><INPUT type="text" name="iahas28" size="5" value="<?php echo $row30['iahas'?>"></td> 
 <td><INPUT type="text" name="lost28" size="5" value="<?php echo $row30['lost'?>"></td>
 <td><INPUT type="text" name="drew28" size="5" value="<?php echo $row30['drew'?>"></td> 
<td><INPUT type="text" name="won28" size="5" value="<?php echo $row30['won'?>"></td> 
 <td><INPUT type="text" name="name28" size="15" value="<?php echo $row30['name'?>"></td>
 <td><INPUT type="text" name="id28" size="5" value="<?php echo $row30['id'?>"></td> 
</tr>
  <tr>
<td><INPUT type="text" name="goals38" size="5" value="<?php echo $row31['goals'?>"></td>
<td><INPUT type="text" name="iahas38" size="5" value="<?php echo $row31['iahas'?>"></td> 
 <td><INPUT type="text" name="lost38" size="5" value="<?php echo $row31['lost'?>"></td>
 <td><INPUT type="text" name="drew38" size="5" value="<?php echo $row31['drew'?>"></td> 
<td><INPUT type="text" name="won38" size="5" value="<?php echo $row31['won'?>"></td> 
 <td><INPUT type="text" name="name38" size="15" value="<?php echo $row31['name'?>"></td>
 <td><INPUT type="text" name="id38" size="5" value="<?php echo $row31['id'?>"></td> 
</tr>
  <tr>
<td><INPUT type="text" name="goals48" size="5" value="<?php echo $row32['goals'?>"></td>
<td><INPUT type="text" name="iahas48" size="5" value="<?php echo $row32['iahas'?>"></td> 
 <td><INPUT type="text" name="lost48" size="5" value="<?php echo $row32['lost'?>"></td>
 <td><INPUT type="text" name="drew48" size="5" value="<?php echo $row32['drew'?>"></td> 
<td><INPUT type="text" name="won48" size="5" value="<?php echo $row32['won'?>"></td> 
 <td><INPUT type="text" name="name48" size="15" value="<?php echo $row32['name'?>"></td>
 <td><INPUT type="text" name="id48" size="5" value="<?php echo $row32['id'?>"></td> 
</tr>
</table>

הייתי חייב להוריד המון חלקים באמצע אבל נמצאים שם החלקים שלא עובדים row1, 5 ועוד כמה
וכאלה שעובדים

Balrog 08-10-06 16:12

אוי אוי אוי
יש סיבה שכתבת את הקוד מי יודע כמה פעמים במקום לעשות בלולאה?

Elad-A 08-10-06 16:14

אה??? למה אתה צריך מסד נתונים חח עשית 900 שאילתות.. תעשה שאילתה אחת ששולפת לפי ה GET או משהו.

LDFIX.CO.IL 08-10-06 16:29

אני יודע אפשר לעשות את זה יותר פשוט אבל אין לי כוח
אז השארתי ככה ובאחרים זה עובד

Balrog 08-10-06 16:33

אני מציע שבכל זאת תחזור לעיין במדריכים של PHP, איך לעבוד עם לולאות ועם מסד נתונים.
בצורה הזאת הקוד לא יהיה קריא, ולא תוכל לעבוד איתו.

LDFIX.CO.IL 08-10-06 16:50

בכל מקרה הסתדרתי זה עובד עכשיו
משהו מוזר היה שם כי כששמתי קוד שעובד במקום אלה שלא עובדים זה הופיע וכשהחלפתי לרגיל זה פעל :S
ובקשר למה שאמרתם
אני יודע איך לעבוד עם בסיס נתונים וזה פשוט זאת מערכת שבניתי ממש כשהתחלתי לפני חצי שנה בערך
אז את הדברים הפחות חשובים לא שיפרתי

Elad-A 08-10-06 17:02

פחות חשובים? 100 שאילתות בדף זה לא חשוב?

LDFIX.CO.IL 08-10-06 17:29

זה פועל בגלל זה זה פחות חשוב
כשיהיה לי זמן כשאני אסיים עם האתר אני אשנה את זה

eLad 08-10-06 18:05

ציטוט:

נכתב במקור על ידי Idan | LDFix.com
זה פועל בגלל זה זה פחות חשוב
כשיהיה לי זמן כשאני אסיים עם האתר אני אשנה את זה

אל תתפלא אם יום אחד זה יחזיר לך script timeout או יטחן את השרת כשיותר מ 2 אנשים יהיו שם בוזמנית.

Eli-Hai 08-10-06 20:24

סתם ככה, אני לא מרוכז ולא התעמקתי ממש בקודים שלך ו/או בתגובות, תנסה לשלוף ב-while.


כל הזמנים הם GMT +2. הזמן כעת הוא 00:11.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ