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
Multiple WHILE loops help
Hi there. I'm writing an application that is pulling and displaying results for real estate listings and associated photographs. The output is using two MySQL querys and WHILE statements. The outer
Displaying image pathname instead of image
HelloIm trying to upload and then display images from a mysql database - Its only basic and i only need one pic per user on the database hence why using mysqlI really need osme help as ive been going
Count Session and Trigger Events
I am New in PHP, seeking a method to count logged users by counting the sessions or any …, is there any way to do it without using a database, and also eager to know a method to make to throw an
Hyperlink is adding an extra gap to variable
Hi, here's my problem..I have a php generated page with a hyperlink which opens in a new windowecho "<tr><td><a
Grabbing Values From an Array for Posting
I have a grid array that I am using with a form that when it hits the currently named test.php it logs in and grabs 3 coordinates (i.e. B1, D3, etc). which come back as XML fields
do while...woes
I'm sure this is childsplay but it is stumping me, everytime i try what I think would make this work, the page hangs... what am i doing wrong here??<?php$number = 5;?><?phpwhile
using a loop help
Hi guys , i need some help. I have this loop :while ($row = mysql_fetch_assoc($Result)) { ?><th><?php echo "<a
Remove Rows From Database ad
Hi All,I have this:Code: [Select]<?phpsession_start();include('../common/dbconnect.php');$stock_id = $_GET['stock_id'];$query='SELECT * FROM users_stocks WHERE user_id ="' .
Question about GD library
I am trying to make an image that shows a random quote from my database.However I want the quote to do 2 things.1. It needs to word wrap so that it stays on the image2. It needs to be the biggest font
how to remove in php string display
My code is$message="We're looking at developing our website.";$body= "My message is,\n\n\n\n\t\t\t".$message";echo $body;I get result We\'re looking at developing our