Zaratul Posted April 24, 2003 Share Posted April 24, 2003 n00b Question, I am folling a tutoral at phpbuilder.com and came accross this part where it wants me to make a DB in Microsoft access but i dont have it I have MySQL and was wondering if anyone could give me the SQL for making a database that will be the equivelant to the one shown. The DB name the want is forum ( i think ), thanks for all the help!! oops forgot the link http://www.phpbuilder.com/columns/jayesh20...029.php3?page=4 Quote Link to comment https://forums.phpfreaks.com/topic/392-n00b-question/ Share on other sites More sharing options...
slate Posted April 24, 2003 Share Posted April 24, 2003 CREATE DATABASE your_db; CREATE TABLE `yourtable` ( `code` INT(9) NOT NULL AUTO_INCREMENT, `parentcode` INT(9) NULL , `title` VARCHAR(30) NULL , `description` VARCHAR(30) NULL , `uname` VARCHAR(30) NULL , `email` VARCHAR(30) NULL , UNIQUE ( `code` ) ); Quote Link to comment https://forums.phpfreaks.com/topic/392-n00b-question/#findComment-1323 Share on other sites More sharing options...
Zaratul Posted April 24, 2003 Author Share Posted April 24, 2003 thanks for the help but i am getting this error now. any ideas? Discussion Forum using PHP/Access under IIS Post New Message Warning: SQL error: [MySQL][ODBC 3.51 Driver][mysqld-4.0.12-nt]Unknown column \'parentcode\' in \'where clause\', SQL state S0022 in SQLExecDirect in d:inetpubwwwrootforum.php on line 19 Warning: odbc_fetch_row(): supplied argument is not a valid ODBC result resource in d:inetpubwwwrootforum.php on line 21 Quote Link to comment https://forums.phpfreaks.com/topic/392-n00b-question/#findComment-1324 Share on other sites More sharing options...
slate Posted April 24, 2003 Share Posted April 24, 2003 Show me lines 10-25 of forum.php please Quote Link to comment https://forums.phpfreaks.com/topic/392-n00b-question/#findComment-1326 Share on other sites More sharing options...
Zaratul Posted April 24, 2003 Author Share Posted April 24, 2003 this is more then that but it starts at line 10 and goes till then end of the function. thanks again shownode(0); // display all the main threads // This function is a recursive function which shall display all the br /anches // and sub br /anches of the threads function shownode($nodecode) { global $connect; // using the global variable for connection // Get a list of all the sub nodes which specific parentcode $noderesult = odbc_exec($connect,\"select * from forum where parentcode = $nodecode\"); echo \'<ul type=\"disc\">\'; while(odbc_fetch_row($noderesult)) // get all the rows { $code = odbc_result($noderesult,\"code\"); $title = odbc_result($noderesult,\"title\"); $uname = odbc_result($noderesult,\"uname\"); $email = odbc_result($noderesult,\"email\"); echo \"<li>\"; echo \"<a href=\"node.php?node=$code\"> $title </a>\"; echo \"-- by ($uname) $email<br />\"; shownode($code); } echo \"</ul>\"; } Quote Link to comment https://forums.phpfreaks.com/topic/392-n00b-question/#findComment-1327 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.