•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 375,245 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,168 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:
Views: 3480 | Replies: 15 | Solved
theres no loop, you are updating all records which have a userid in the comma separated list and match youre where/and statements. Try wrapping each value in quotes (if the columns are int you dont need to do this)
you could also try this
[php]
if (mysql_num_rows($query)) {
$ary = array();
foreach (mysql_fetch_assoc($query) as $key => $val) {
$ary[] = $val;
}
$ary = implode(',',$ary);
}
[/php]
Its doing the same thing in a different way. if that still fails, post the relevant code.
you could also try this
[php]
if (mysql_num_rows($query)) {
$ary = array();
foreach (mysql_fetch_assoc($query) as $key => $val) {
$ary[] = $val;
}
$ary = implode(',',$ary);
}
[/php]
Its doing the same thing in a different way. if that still fails, post the relevant code.
Last edited by sn4rf3r : Oct 12th, 2006 at 9:58 pm. Reason: fixed syntax
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb MySQL Marketplace
- Previous Thread: How do I edit a file in MySql please?
- Next Thread: Image Database



Threaded Mode