Very new to php & mysql.
Here is what I’m trying to do:
When you click on records it goes to domain.com/record/id and only displays the record of that id.
Here is what is happening: I can get all records if i remove $id but receiving nothing with the code below. I know that my mysql code is old. I am updating. Thanks
[php]<?php
case ‘records’: $this-> get_records ($callParams[1]);
private function get_records($id)
{
$result = get_records_info ($id) ;
if(count($result) > 0)
$this->response($this->text/html($result), 200);
else
$this->response(’’,204);
}
function get_records_info ($id){
$result = mysql_query (“SELECT * FROM records
where id
= ’ “.$id.” ’ “)
or die(mysql_error());
while($records = mysql_fetch_array( $result )) {
echo “
echo “
echo “
}
}
?>[/php]