ziedinjsh Posted August 19, 2012 Report Posted August 19, 2012 mysql_query("insert into links (title, desc, link, img_to_upload, date) values ('$title', '$desc', '$link', '$photo', '$date')") or die(mysql_error()); visu laiku bļauj 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 ''title', 'desc', 'link', 'img_to_upload', 'date') values ('besiiiiii ' at line 1 kā tad vēl var saglabāt??? Quote
zintis8789 Posted August 19, 2012 Report Posted August 19, 2012 pameiģini mysql_query("insert into `links` (`title`, `desc`, `link`, `img_to_upload`, `date`) values ('{$title}', '{$desc}', '{$link}', '{$photo}', '{$date}')") or die(mysql_error()); Quote
Mr.Key Posted August 19, 2012 Report Posted August 19, 2012 Piemērā ir bez single quotes, error ziņojumā - ar. Kaut kas nelīmējas kopā. Pareizāk sakot, tu esi izmantojis ' tā vietā, lai izmantotu `. Jo kļūdu rada lauks desc, kura nosaukums atbilst MySQL rezervētajam vārdam. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.