Hi I want to get multiple rows from a db
I am using this for the db query
Code: public function getCeleb($product_id) {
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_to_celeb WHERE product_id = '" . (int)$product_id . "'");
foreach ($query->rows as $result) {
$celeb_id = $result['celeb_id'];
}
return $celeb_id;
}
and this to display the returned data
Code: 'celeb_id' => $result['celeb_id']
print_r ($celeb_id);
the problem is i only get one result from the database and i have multiple entries with the same id
thanks in advance
Display Database
I need to create a shopping cart. I found this code online: http://conceptlogic.com/jcart/Unfortunately, I dont know how to display my product from MYSQL rather than hardcoding as shown in the script
Operating System
How in PHP or other language can I detect Operating system, ie Windows XP Home, Windows 7 Ultimate, Mac OS 10?Anyone know how?Thanks
PHP header help!
Hi all I am trying to get this php page to refresh every 5 seconds on my phone which is an aastra 480i IP desk phone.The code below the header line displays a menu on my phone. That works fine so no
Drawing Images in classes
I'm quite new to Object Oriented PHP. What I'm trying to do is draw some images but also have other content on the page.Code: include('images.php');//New Image set$im=new images();//Sends headers and
Problem Dereferencing
With these types and tables:
Interpret Order
Hello all,I'm wondering if I have this:Code: $switch = array( 'one' => $this->RenderOne() ,'two' => $this->RenderTwo());Would php call the function
Pro-rata Billing in Periodic Billing for Rental
Hi guys,
Probably a simple error...
I'm getting the error -- Parse error: syntax error, unexpected '{' in /home/content/c/s/t/csteffen242/html/staples/event.php on line 46I checked it over and couldn't find anything wrong with an extra
Apple's revamped lineup arrives
I'm personally curious about the magic mouse.. a multi-touch concept sounds like it could be neat.. just wonder if it performs as well as a mouse w/ trackball. I'm also curious as to why no 24"
What is SAP Avatar ?
Hi All,