robscov has asked for the wisdom of the Perl Monks concerning the following question:
mysql> select Preferences.i_preference_desc, Preference_Desc.name, Pre +ference_Desc.value as range_value, Preferences.value as value, Prefer +ence_Desc.def_value from Preferences, Preference_Desc WHERE Preferenc +es.i_preference_desc=Preference_Desc.i_preference_desc and i_account= +894; +-------------------+------------------+------------------------------ +------+-----------------------+-----------+ | i_preference_desc | name | range_value + | value | def_value | +-------------------+------------------+------------------------------ +------+-----------------------+-----------+ | 0 | mode | voicemail, auto_attendant + | voicemail | voicemail | | 1 | password | + | 777 | | | 2 | password_ask | yes, no + | no | no | | 3 | prompt_levels | standard, extended, rapid + | standard | standard | | 4 | announce_dt | yes, no + | no | no | | 5 | auto_play | yes, no + | no | no | | 6 | greetings | standard, extended, personal, + name | personal | standard | | 7 | fax_file | multi_png, multi_tiff, pdf, t +iff | pdf | pdf | | 8 | iso_639_1 | RefB=Languages + | en | en | | 9 | ext_email | + | robscovell@notonyournelly.com | | | 10 | ext_email_action | none, forward, notify, copy + | forward | none | +-------------------+------------------+------------------------------ +------+-----------------------+-----------+ 11 rows in set (0.00 sec)
$sql="select Preferences.i_preference_desc, Preference_Desc.name, Pref +erence_Desc.value as range_value, Preferences.value as value, Prefere +nce_Desc.def_value from Preferences, Preference_Desc WHERE Preference +s.i_preference_desc=Preference_Desc.i_preference_desc and i_account=? +"; my $sth2 = $dbh2->prepare($sql); $sth2->execute($account); my $preferences = {}; while (my $row = $sth2->fetchrow_hashref) { $preferences->{$row->{name}} = { value => $row->{value}, range_val +ue => $row->{range_value}, def_value => $row->{def_value} }; warn $row->{value}; } $sth2->finish();
no at /home/beechams/new_gui/cu_accounts/voicemail_options.html line 9 +4. no at /home/beechams/new_gui/cu_accounts/voicemail_options.html line 9 +4. no at /home/beechams/new_gui/cu_accounts/voicemail_options.html line 9 +4. no at /home/beechams/new_gui/cu_accounts/voicemail_options.html line 9 +4. no at /home/beechams/new_gui/cu_accounts/voicemail_options.html line 9 +4. no at /home/beechams/new_gui/cu_accounts/voicemail_options.html line 9 +4. no at /home/beechams/new_gui/cu_accounts/voicemail_options.html line 9 +4. no at /home/beechams/new_gui/cu_accounts/voicemail_options.html line 9 +4. no at /home/beechams/new_gui/cu_accounts/voicemail_options.html line 9 +4. no at /home/beechams/new_gui/cu_accounts/voicemail_options.html line 9 +4. no at /home/beechams/new_gui/cu_accounts/voicemail_options.html line 9 +4.
READMORE tags added by Arunbear
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI gives out wrong data
by dragonchild (Archbishop) on Jun 27, 2005 at 13:14 UTC | |
by robscov (Initiate) on Jun 27, 2005 at 13:24 UTC | |
by robscov (Initiate) on Jun 27, 2005 at 14:19 UTC | |
by robscov (Initiate) on Jun 28, 2005 at 02:39 UTC | |
|
Re: DBI gives out wrong data
by Fletch (Bishop) on Jun 27, 2005 at 12:49 UTC | |
|
Re: DBI gives out wrong data
by samizdat (Vicar) on Jun 27, 2005 at 12:57 UTC | |
by robscov (Initiate) on Jun 27, 2005 at 13:08 UTC |