help needed i'm new...

From: Date: Fri, 25 Aug 2000 10:09:08 +0000
Subject: help needed i'm new...
Groups: php.general 
Request: Send a blank email to php-general+get-13636@lists.php.net to get a copy of this message
Hello; I hope anybody will find time to help me. i'm new to php but i want to learn it. I've a question: i've a linux server with php3 i've created a database on the server named : "rooster" (on the server it says: rooster.db 0 bytes...) now i'm trying to make tables in this db called 'rooster' with an example i found: <? $Dbnaam = "rooster"; $Overstr = "DROP TABLE week"; $Maakstr = "CREATE TABLE week ( " ." Idxnr int," ." Trimester char(1)," ." Vak char(28)," ." Dag char(9)," ." Tijd_begin char(5)," ." Tijd_end char(5)," ." Lokaal char(4)," ." Vakcode char(6)," ." Docentnr int" .")"; $Indexstr = "CREATE UNIQUE INDEX idx1 ON week (Idxnr)"; IF ($ResultDrop2 > 0 && $ResultCreate2 > 0 && $ResultDex2 > 0) { ECHO "Tabel WEEK en index aangemaakt!"; } ELSE { ECHO "Een fout bij het aanmaken van Tabel Week"; } $Overstr2 = "DROP TABLE docent"; $Maakstr2 = "CREATE TABLE docent ( " ." Docentnr int," ." Telnum char(10), " ." Naam char(25) not null," ." Loon money," ." Opmerk char(100)" .")"; $Indexstr2 = "CREATE UNIQUE INDEX idx2 ON docent (Docentnr)"; $ResultDrop2 = MSQL($Dbnaam,$Overstr2); $ResultCreate2 = MSQL($Dbnaam,$Maakstr2); $ResultDex2 = MSQL($Dbnaam,$Indexstr2); IF ($ResultDrop2 > 0 && $ResultCreate2 > 0 && $ResultDex2 > 0) { ECHO "Tabel DOCENT en index aangemaakt!"; } ELSE { ECHO "Een fout bij het aanmaken van Tabel Docent"; } ?> Can i simple put this in a HTML layout between the <body> tag and saved it with the extension: .php3 ? Because when i do this i get an error: Fatal error: Call to unsupported or undefined function msql() in /www/htdocs/harencity/db1.php3 on line 41 What is wrong ? Thanks for helping out. Marck Koehler

« previous php.general (#13636) next »