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

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

DiXXOver 26-06-09 17:10

הכנסת תוכן ל-MYSQL
 
שלום,

יש לי משתנה שמכיל תגיות HTML שברצוני להכניס לתוך המסד הנתונים.
התא במסד הנתונים הינו מסוג blob.

זהו המשתנה:
PHP קוד:

$new_msg="<fieldset style='color: #750606; border-style: solid; border-width: 1px; padding: 1px'><legend><font color='#003099'>טקסט</font></legend><font color='gray'>"

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

Tomer 26-06-09 17:43

blob מכיל מידע בינארי. תשנה ל text.

DiXXOver 26-06-09 18:03

ציטוט:

נכתב במקור על ידי Tomer (פרסם 724111)
blob מכיל מידע בינארי. תשנה ל text.

שיניתי וזה עדיין נותן לי את אותה השגיאה!
PHP קוד:

You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near 'color: #750606; border-style: solid; border-width: 1px; padding: 1px'><f at line 1 


vadimg88 26-06-09 18:22

PHP קוד:

$new_msg mysql_real_escape_string("<fieldset style='color: #750606; border-style: solid; border-width: 1px; padding: 1px'><legend><font color='#003099'>טקסט</font></legend><font color='gray'>"); 


DiXXOver 26-06-09 20:11

ציטוט:

נכתב במקור על ידי vadimg88 (פרסם 724124)
PHP קוד:

$new_msg mysql_real_escape_string("<fieldset style='color: #750606; border-style: solid; border-width: 1px; padding: 1px'><legend><font color='#003099'>טקסט</font></legend><font color='gray'>"); 


וואלה איך לא עלה לי לראש..
סליחה הייתה שאלה מיותרת תודה!


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

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