DeepakJ Posted August 10, 2007 Share Posted August 10, 2007 I'm finding it difficult to figure out what is wrong with this script. I know the problem lies with the post text value but am unsure exactly what. INSERT INTO phpbb_posts_text (post_id, bbcode_uid, post_subject, post_text) VALUES('2', ' ', 'Service Pack 1 for VisualMill 5 has been released!', 'Please go to Downloads->Service Packs and download the Service Pack 1 for VisualMill. <br><br>You can also get the complete product with Serice Pack included from the Support->Download 5.0 link.<br><br>The bugs fixed in this Service Pack are as follows:<br><br>1. Allow user to keep visibility of part/regions in the Stock View. A new check box has been added in the Display Preferences.<br>2. Crash when loading part without layers when active layer is not Default<br>3. Cannot import regions as IGES files<br>4. When selection regions all, the surfaces get highlighted.<br>5. Re-roughing does not work after the Rotate Table or the Set MCS operations<br>6. Browser/Geometry - [DEL] key does not work<br>7. Copy and paste mops in the Mops Browser is not working<br>8. Parasolid 2004 files can now be imported<br>9. Keyboard accelerators are now working<br>10. Decimal point input without leading zeros in 2-1/2 axis operations now work correctly<br>11. Ability to drag meshes and curves up and down in the browser restored<br>12. Parallel finishing problem with very small tools and parts<br>13. The advanced pocketing dialog does not allow users to choose other cut patterns.<br>14. Alibre plug-in now picks up the correct version of VisualMill<br>15. Scallop height step-over computations for Between 2 Curves machining implemented<br>16. Post Processor Options - If you mark the – Do not display this dialog again – then the output does not come to the note pad anymore<br>17. Post Processing - When the "Show Dialog when Post-Processing" is turned off, the path and file name<br>18. Post Processing - VM Crashes when trying to post any 4th axis motion via "Rotate Table" mop, no matter what post file is selected<br>19. When saving a part file when in Stock view, the part file is saved with all part/regions visibility off. <br>20. Mop's properties dialog does not display help<br>21. Machine Setup - Tool Change Position doesn't stick after values are entered manually or with the scroll arrows, only sticks when picking a point.<br>22. When opening a new file, does not prompt to save work on previous file if something has changed<br>23. Click the "Feed/Speeds" button and change the values. The values don't stick.<br>24. Tab order of all dialogs are corrected<br>25. Help button in standard bar is now hooked up correctly<br>26. When in the 'Browser/Geometry/Curves', selecting a curve and hitting Ctrl-C crashes VM5.0.<br>27. Locate part does not work correctly when working with stock box<br><br><br><br><br>'); Quote Link to comment Share on other sites More sharing options...
DeepakJ Posted August 10, 2007 Author Share Posted August 10, 2007 Please!! Quote Link to comment Share on other sites More sharing options...
freakus_maximus Posted August 10, 2007 Share Posted August 10, 2007 The problem is that you have single quotes all over the place that is killing it. To see this: 1. Download Notepad++ 2. Copy and Paste the full statement into a new file in Notepad++ 3. In Notepad++ select "Language" from the menu bar, then click SQL You will see the valid SQL commands INSERT", "INTO", "VALUES" highighted in blue. Then you will also see where your errors are because you have plain text also in blue. This will tell you that you do not have your quotes correct. Example: 26. When in the 'Browser/Geometry/Curves', selecting a curve and hitting Ctrl-C crashes VM5.0. Quote Link to comment Share on other sites More sharing options...
Adam1239 Posted August 10, 2007 Share Posted August 10, 2007 I'm finding it difficult to figure out what is wrong with this script. I know the problem lies with the post text value but am unsure exactly what. INSERT INTO phpbb_posts_text (post_id, bbcode_uid, post_subject, post_text) VALUES('2', ' ', 'Service Pack 1 for VisualMill 5 has been released!', 'Please go to Downloads->Service Packs and download the Service Pack 1 for VisualMill. <br><br>You can also get the complete product with Serice Pack included from the Support->Download 5.0 link.<br><br>The bugs fixed in this Service Pack are as follows:<br><br>1. Allow user to keep visibility of part/regions in the Stock View. A new check box has been added in the Display Preferences.<br>2. Crash when loading part without layers when active layer is not Default<br>3. Cannot import regions as IGES files<br>4. When selection regions all, the surfaces get highlighted.<br>5. Re-roughing does not work after the Rotate Table or the Set MCS operations<br>6. Browser/Geometry - [DEL] key does not work<br>7. Copy and paste mops in the Mops Browser is not working<br>8. Parasolid 2004 files can now be imported<br>9. Keyboard accelerators are now working<br>10. Decimal point input without leading zeros in 2-1/2 axis operations now work correctly<br>11. Ability to drag meshes and curves up and down in the browser restored<br>12. Parallel finishing problem with very small tools and parts<br>13. The advanced pocketing dialog does not allow users to choose other cut patterns.<br>14. Alibre plug-in now picks up the correct version of VisualMill<br>15. Scallop height step-over computations for Between 2 Curves machining implemented<br>16. Post Processor Options - If you mark the – Do not display this dialog again – then the output does not come to the note pad anymore<br>17. Post Processing - When the "Show Dialog when Post-Processing" is turned off, the path and file name<br>18. Post Processing - VM Crashes when trying to post any 4th axis motion via "Rotate Table" mop, no matter what post file is selected<br>19. When saving a part file when in Stock view, the part file is saved with all part/regions visibility off. <br>20. Mop's properties dialog does not display help<br>21. Machine Setup - Tool Change Position doesn't stick after values are entered manually or with the scroll arrows, only sticks when picking a point.<br>22. When opening a new file, does not prompt to save work on previous file if something has changed<br>23. Click the "Feed/Speeds" button and change the values. The values don't stick.<br>24. Tab order of all dialogs are corrected<br>25. Help button in standard bar is now hooked up correctly<br>26. When in the 'Browser/Geometry/Curves', selecting a curve and hitting Ctrl-C crashes VM5.0.<br>27. Locate part does not work correctly when working with stock box<br><br><br><br><br>'); Hi its better to do it this way, as its alot easyer and make sure you put the \ before you put the " or ' example: $post_id="string\"string\"string";.. $post_id = "POST ID HERE"; $bbcode_uid = "BB CODE ID HERE"; $post_subject = "POST SUBJECT HERE"; $post_text = "POST TEXT HERE"; mysql_query("INSERT INTO `phpbb_posts_text` (`post_id`,`bbcode_uid`,`post_subject`,`post_text`) VALUES ('$post_id','$bbcode_uid','$post_subject','$post_text')"); Quote Link to comment Share on other sites More sharing options...
DeepakJ Posted August 10, 2007 Author Share Posted August 10, 2007 Thanks for all the help I fixed it. I simply used mysql_escape_string on it and it works fine now. Thanks! Quote Link to comment Share on other sites More sharing options...
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.