Hi,
Im having trouble trying to figure out where to start with this problem. I have two tables.
module ={module_id, module_name, subtype, height, width, depth, mod_desc, confirmed}
object ={object_id, module_name, object_name, xpos, ypos, proj_id}
Given a value for proj_id I have to check wether any records in my table contain this value. If there are records that contain this value I need to create an array of the following {object_name, xpos, ypos, height, width}
Can anyone help me in creating this array? Heres my code so far
Im having trouble trying to figure out where to start with this problem. I have two tables.
module ={module_id, module_name, subtype, height, width, depth, mod_desc, confirmed}
object ={object_id, module_name, object_name, xpos, ypos, proj_id}
Given a value for proj_id I have to check wether any records in my table contain this value. If there are records that contain this value I need to create an array of the following {object_name, xpos, ypos, height, width}
Can anyone help me in creating this array? Heres my code so far
Code:
<?php
require "config.php";
// $proj = $_POST['proj'];
// Get how many records contain proj_id = proj
$query = mysql_query("SELECT COUNT(*) FROM object WHERE proj_id = '4'");
$result = mysql_fetch_row($query) or die(mysql_error());
//echo "result: ".$result[0];
// if zero do nothing
if ($result != 0) {
}
?>
Comment