Sean |
|
---|---|
Ive got a problem with an SQL query in a plugin im writing. Im trying to pass an array into a MySQL Query, but im having some problems. Every time i try the plugin in my browser, I get redirected to the Error #905 (Wrong URL) error page. No mysql error, nothing. Whats going on? Ive tried passing the array into a variable, then serializing it, ive tried converting the variable but nothing seems to work. Any ideas? Thanks.
|
GHengeveld |
|
---|---|
Serialize should do it. Please provide some of your code. Error 950 could be because you're importing a variable which doesnt hold the right datatype. As far as i know this only happens if the last parameter of sed_import is set to true.
|
Sean |
|
---|---|
It could be that im not using serialize properly. Ive never used it before, and all i know about it is what ive read on the internet
I should probably explain what im trying to do first. Im trying to modify the Seditio gallery plugin to display multiple galleries on the same page. So for example, /plug.php?e=gallery&f=2|4|1 will display pictures from gallery 2, 4 and 1. So what ive done is imported $f, exploded it, then looped through each gallery. Heres the code: Does it have something to do with sed_import do you think? Thanks a lot for your help! |
|
Dit bericht is bewerkt door Kilandor (2009-10-30 02:45, 14 jaren ago) |
Kilandor |
|
---|---|
|
Sean |
|
---|---|
ha ha yes it looks like i made a typo. I don't think this is the problem though... ive had serialize working properly when i was messing around with it before but it still wasn't working for me. How would I serialize $collections[$count]? When I tried it before, $collections['1'] out puts as s:1:"1"; which of course just gives me an SQL error. I guess i dont quite understand how serialize works.
EDIT: I think ive found out what is causing the 905 error. After the second SQL query theres a line sed_die(mysql_num_rows($sql_pff)==0); Added 16 minutes later: Ahh stupid me. I figured it out. The sed_import for $f was wrong, 2|3|5 is not a int. I set it to txt and now it works |
|
Dit bericht is bewerkt door Sean (2009-10-30 03:59, 14 jaren ago) |
GHengeveld |
|
---|---|
Why use url.php?f=1|2|3 if you can just use url.php?f=1&f=2&f=3 ? This will make $f an array automatically so you don't need to explode it. This is de default way in which checkboxes and multiple selects get sent with the GET method.
|