[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sheflug] php / moodle problem
> >
> > I'm not sure if I'm missing something obvious, but I've hit a brick
> > wall. I'm writing a set of php / shell scripts to import pupils,
> > teachers and courses from SIMS into moodle, and I've hit a php problem I
> > can't get my head round. There's a set of csv data in a text file
> > (pupil_enrollment.txt)
> >
>
> You're connecting to MySQL, but you're not selecting a database.
> You need to do something like:
> $conn = mysql_connect($CFG->dbhost,$CFG->dbuser,$CFG->dbpass);
> $db = mysql_select_db($dbname, $conn);
It's not that I'm afraid. I've put in a specific db connection, but the
query was already successfully returning a resource id based on a
connection already established in the moodle setup files
David
___________________________________________________________________
Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html
GNU the choice of a complete generation.