Jump to content

puremagnum

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

puremagnum's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ok i fixed thx u guys soooooo much ... i h8 this stupid video for this.... should i stop useing the video??. considering its teaching me old syntex??.
  2. ok good news the pg is loading finally!!! woot but now i see SELECT * FROM pages WHERE subject_id = 1 inside of my navigation box lol. so im guessing its reading that line as a string??
  3. thx for the code... inserted it got this when loaded pg Notice: Undefined variable: page in C:\wamp\www\widget_corp\content.php on line 24 # Notice: Undefined variable: page in C:\wamp\www\widget_corp\content.php on line 24 # Notice: Undefined variable: page in C:\wamp\www\widget_corp\content.php on line 24 # SELECT * FROM pages WHERE subject_id =Query string: SELECT * FROM pages WHERE subject_id = Produced error: 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 '' at line 1 y is this sooo flippen hard if im such a newb!!! lol
  4. i was one step ahead of u <?php $subject_set = mysql_query("SELECT * FROM subjects",$connection ); if(!$subject_set) { die("DB query failed:" . mysql_error()); } while($subject = mysql_fetch_array($subject_set)) { echo "<li>{$page['menu_name']}</li>"; } $query="SELECT * FROM pages WHERE subject_id = $subject['id']"; echo $query; $page_set=mysql_query($query) or die( "<br>Query string: $query<br>Produced error: " . mysql_error() ); echo"<ul class=\"pages\">"; while($page= mysql_fetch_array($page_set)) { echo "<li>{$page["menu_name"]}</li>"; } if(mysql_num_rows($page_set)>0){ } echo "</ul>"; ?> thats what im currently working on
  5. i forgot a re-added my notes to self.. took em back out and now its on line 23 again my fault
  6. aame error but now i got the error on line 23 now witch is echo "<li>$page['menu_name']</li>";
  7. i put in the end of the while loop is that ok??.. and it didnt make a difference
  8. line 27 - 32... $page_set=mysql_query($query) or die( "<br>Query string: $query<br>Produced error: " . mysql_error() ); echo"<ul class=\"pages\">"; while($page= mysql_fetch_array($page_set)) { echo "<li>{$page["menu_name"]}</li>"; }
  9. Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in X:\WWW\YYYY\blahh\pg.php on line 29 line 29 is $query="SELECT * FROM pages WHERE subject_id = $subject['id']";
  10. now im getting Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' on line 29 good news tho... we moved down a line lol srry didny mean to double post.. u can earse this one
  11. new error now im going nuts lol SELECT * FROM pages WHERE subject_id = 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 '' at line 1
  12. yeah the subject id it is a number
  13. thanks that worked.. not getting the same error any more.. but now im getting Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in X:\CCC\WWWW\folder\pg.php on line 28" $query="SELECT * FROM pages WHERE subject_id = $subject['id']"; im srry for the hassle lol... told u im new
  14. so pikachu, u saying its bad practice to do it like that??..hmm.. well iv been following a step by step traning vids(prolly outdated??).. so im just lost on how it can be bad practice and yes MMDE im pretty sure i got something assigned to it
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.