the way I was taught to connect to a
db was with this type of command
>: $sql1 = "SELECT * FROM mdl_university
> where university_num = '$university_num'"; $result1 =
> @mysql_query($sql1, $conn) or die("Couldn't execute 'Continue addition'
> query1 ".$sql1);
and then retrieve some vals
> while ($row = mysql_fetch_array($result1))
> { //while in
>
> $university_num = $row['university_num'];
The $conn variable in @mysql_query($sql1, $conn)is an array of the db
host, username, password This method has always worked fine for me.
I need help to understand the syntax you use in Moodle. Where are the username, password, table name values stored? And where and how is the sql query stored?
Thanks