-
January 22nd, 2009, 12:56 AM
#1
mysqli retrieve unspecified amount of fields
hi
i faced this problem since yesterday and I still haven't got the right solution yet
to cut it short, here's my preparedstatement query
Code:
$query = "select * from ingredients where id=? and language=?";
$stmt = $dbi->prepare($query);
$stmt->bind_param('ss', $ID,$language);
$stmt->execute();
the table has the field name that starts with ingredients1, ingredients2,quantity1,quantity2 and so on until ingredients50 and quantity50.
my problem is how do I read all those returned fields? I need the returned fields to be set to its respective variable name, for example the field ingredients1 assigned to variable $ingredients1 and so on?
i tried the solution at http://forums.devshed.com/php-develo...ay-568982.html but still can't get it working as I want it
any help is greatly appreciated! thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|