sniko Posted March 11, 2012 Posted March 11, 2012 (edited) Following on from Database Table Design This will help save resources, as said in the article above; 1. Run this SQL http://codepad.org/ST5AIzuQ 2. Open up education.php 3. Find this query You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. 4. Replace with You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. 5. Replace this snippet You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. 6. With You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. 7. Save education.php 8. Open cron_day.php 9. Find; You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. 10. Replace with; You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. 11. Find; You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. 12. Replace with; You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. And that's it... -sniko Edited March 14, 2012 by sniko Thanks Illusions for your reply! Quote
danger boy Posted March 11, 2012 Posted March 11, 2012 Great idea! However, this error occurs: Parse error: syntax error, unexpected T_ELSE in /home/dangerbb/public_html/education.php on line 15 Quote
sniko Posted March 11, 2012 Author Posted March 11, 2012 However, this error occurs: Parse error: syntax error, unexpected T_ELSE in /home/dangerbb/public_html/education.php on line 15 Sorry, that should do it now, review step 6. Quote
danger boy Posted March 11, 2012 Posted March 11, 2012 Now I get the below error, QUERY ERROR: Unknown column 'cdays' in 'field list' Query was SELECT `crNAME`,`cdays` FROM courses WHERE crID=3 Quote
Damagedcity.com Posted March 12, 2012 Posted March 12, 2012 @dangerboy.. Did u run the sql as per the first step? Quote
Uridium Posted March 13, 2012 Posted March 13, 2012 (edited) your Table shows as users_courses yet some parts refer to users_course Just too make people aware.. 6. line 5 needs editing from cdays to crDAYS 10. needs to be users_courses 12. need to be users_courses Edited March 14, 2012 by illusions Quote
sniko Posted March 14, 2012 Author Posted March 14, 2012 (edited) your Table shows as users_courses yet some parts refer to users_course Just too make people aware.. 6. line 5 needs editing from cdays to crDAYS 10. needs to be users_courses 12. need to be users_courses Thanks for spotting those! ** Illusions ** sorry for editing this post but i had to change 12 Edited March 14, 2012 by illusions 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.