Open Source & Stuff  
  |     Main Site     |      Forum     |     Contact     |
Ajax Linked Select boxes :  forum.Salix.gr forum.Salix.gr
Comments, questions, usage, bugs. 
Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
messageThe extra WHERE attribute
Posted by: moonwalker (IP Logged)
Date: May 26, 2007 06:57PM

How does that thing work? grinning smiley

I have an enum field on my table for the lyrics. "y" if there are any lyrics for the song and "n" if there are no lyrics. I use the following script:

$sc_ajax_select_boxes->add_select_box('songs','songs_id','name','songs_id','','songs','songs','','lyrics=n');

What am I doing wrong here?

Thx in advance and I must say that this code made my life a lot easier! grinning smiley

Peace.

P.s.: What I try to achieve is to just show the songs without lyrics, so the admin won't add two lyrics for the same song. smiling smiley



Edited 1 time(s). Last edit at 05/26/2007 06:59PM by moonwalker.

messageRe: The extra WHERE attribute
Posted by: panos (IP Logged)
Date: May 27, 2007 03:54AM

hmm....
i have to run so no time to make tests now, but the fast thing is that
for enums i think value should be quoted

$sc_ajax_select_boxes->add_select_box('songs','songs_id','name','songs_id','','songs','songs','',"lyrics='n'");

but not really sure.

Tonight when i come back from visit to mother in law smiling smiley i will do some tests

PS. Does different "Please select" messages works for you?

Cheers



Edited 1 time(s). Last edit at 05/27/2007 03:55AM by panos.

messageRe: The extra WHERE attribute
Posted by: moonwalker (IP Logged)
Date: May 27, 2007 10:26AM

Hi Panos!

No it's not working that way. Thx for your help!

I didn't yet download the last version for the "Please select" messages. I will download it now and give it a shot.

Peace.

Edit:

Just installed the new files and it works great!!!!! I can now apply a different "Please select" message for each box. Keep it up!

Edit 2:

Sorry but the WHERE attribute works just fine. I forgot to reload the page before testing it. Problem solved! Thx again! winking smiley

Edit 3:

The WHERE attribute works fine, but the links between the boxes does not work anymore. Firebug gives the following error:

Quote:
missing ; before statement
[Break on this error] pars += '&extra_where=lyrics='n'';\n

Any idea? smiling smiley



Edited 3 time(s). Last edit at 05/27/2007 10:49AM by moonwalker.

messageRe: The extra WHERE attribute
Posted by: panos (IP Logged)
Date: May 27, 2007 03:25PM

Yeah you discovered a bug!!
Try new version 0.3a i think with an addslashes() bug fixed.

Please try it and tell me if it works.

Thanks

messageRe: The extra WHERE attribute
Posted by: moonwalker (IP Logged)
Date: May 27, 2007 03:29PM

Great! Thx! I will download it right away. Which files do I have to update? Or is a clean installation needed?

Edit:
It's solved. It works great now! Thx again Panos!

Edit 2:
lol..now the different text for "please select" does not work anymore!!!! grinning smiley

Peace



Edited 3 time(s). Last edit at 05/27/2007 03:40PM by moonwalker.

messageRe: The extra WHERE attribute
Posted by: panos (IP Logged)
Date: May 27, 2007 07:09PM

LOL

LOL

I made last changes to previous version!!


sorry about that, download now
but please check the 2 files to have // sc_classes.php v0.3a grinning smiley

messageRe: The extra WHERE attribute
Posted by: moonwalker (IP Logged)
Date: May 27, 2007 08:30PM

LOL

No problem. Thank you for your effort! It's working just fine now! grinning smiley

Have a nice day.

Peace.



Sorry, only registered users may post in this forum.

All Rights Reserved 2006 Salix.gr  |  Design by Ades Design |  Hosting by e-emporio |  forum.Salix.gr powered by Phorum