ok thanks, i know how the flow will go. just could not figure out how to start with the loop for each entry.
neway, thanks again! Try ko sa php :) thanks, Louie On Thu, 08 Jul 2004 08:50:21 +0000, Joebert Jacaba <[EMAIL PROTECTED]> wrote: > hmm. im not that good at bash or mysql and i will give only the > pseudocode. u have to read on the specifics. > > what u will need to do is count the entries on a certain table then use > that number for ur for-loop or while-loop. a "select count(field) from > table" would get the count i think. > > > > On Thu, 2004-07-08 at 07:51, Louie Miranda wrote: > > pano sir ung for count of field? > > > > On Thu, 08 Jul 2004 07:29:46 +0000, Joebert Jacaba > > <[EMAIL PROTECTED]> wrote: > > > On Thu, 2004-07-08 at 06:50, Louie Miranda wrote: > > > > #!/bin/sh -x > > > > for i in `pwgen --no-capitalize -N1` > > > > do > > > > echo "update dump set random= '$i'"|mysql -uroot insert > > > > done > > > > > > > > ang balak ko kse mag set nang loop para sa update (mysql) ko sa isang > > > > mysql field. ilalagay ko random keys sa isang field using ung pwgen. > > > > ang kaso, andto pa lang ako. > > > > > > > > can u help me? :( > > > > > > this only generates one(1) $i. maybe u need to (pseudocode): > > > > > > for count of field; do > > > i=pwgen > > > update field=$i thru mysql > > > done > > > > > > > > > > > > > > -- Louie Miranda http://www.axishift.com -- Philippine Linux Users' Group (PLUG) Mailing List [EMAIL PROTECTED] (#PLUG @ irc.free.net.ph) Official Website: http://plug.linux.org.ph Searchable Archives: http://marc.free.net.ph . To leave, go to http://lists.q-linux.com/mailman/listinfo/plug . Are you a Linux newbie? To join the newbie list, go to http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie
