Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About matthuisman

  • Rank
  1. Hi O'brien5. Maybe some example data may help? eg: HS_results EXAMPLE ROWS Exams_Board_results EXAMPLE ROWS
  2. I had a few issues with the .htaccess as well. I ended up using the below which works for me. Options +FollowSymLinks IndexIgnore */* <ifModule mod_rewrite.c> # Turn on the engine: RewriteEngine on # Don't perform redirects for files and directories that exist: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # For everything else, redirect to index.php: RewriteRule ^.*$ /index.php [L] </ifModule>
  3. Also, same fix for Comments.php model ' array('user_id', 'exist', 'attributeName'=>'id', 'className'=>'User'), array('page_id', 'exist', 'attributeName'=>'id', 'className'=>'Page'), '
  4. Update: Fixed the issue by using: array('user_id', 'exist', 'attributeName'=>'id', 'className'=>'User'), Did a bit of debugging, the SQL yii was using before using the above was "SELECT 1 FROM `page` `t` WHERE `t`.`user_id`=:ycp0 LIMIT 1" Now, with the above it uses "SELECT 1 FROM `user` `t` WHERE `t`.`id`=:ycp0 LIMIT 1" So, think this may be a mistake in the book? Thanks, Matt
  5. Hi, Having a strange issue working through the Yii book CMS example. So. I will empty all tables then login as admin. I can then add a new user fine. user_id = 1. If I then try to add a page/comment/file, and input a user_id of 1, it returns "User "1" is invalid." The 'exist' validation is failing even though there is a user with user_id of 1. Strangely, this only happens if there are no rows in the 'page' table. If i manually add a row to the 'page' table then I can add pages from then on not a problem. But, if I go and delete the pages and then try add a page - error come
  • Create New...