Jump to content

Array values from different tables in a database


Recommended Posts

<?php$host="localhost";$uid="root";$pwd="";$DB="engineering";?><?php$engineering=mysql_connect($host,$uid,$pwd)or die("localhost not connected");mysql_select_db($DB)or die("DB connection lost");?> // database connections <?php$query="select * from resultf where Matric ='$matric'";$result=mysql_query($query);$record=mysql_num_rows($result);$az=mysql_result($result,$i,"GPA"); // collected value and store it in $az function getRepeatCourse2($row) { $repeatCourse = array(); $repeatCourse[]=$az; return implode(", ",$repeatCourse); }?>when i call the function in a class, $az will have no value, pls help me

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...