auctioninvestor Posted June 8, 2007 Share Posted June 8, 2007 Yes, I am in over my head with a project and I need some help. I have been slowly learning on my own but a good friend came to me with a script and asked me to modify it... the page is kind of long, but here are the parts I think are relevant... [pre] $seekthis = (int) get_param("seeking", 1); echo 'look for: ' .$seekthis; [/pre] returns "look for:5" [pre] p_orientation=" . to_sql(DB::result("SELECT id FROM const_orientation WHERE id=" . get_param("seeking", 1), "Number"), "Number") . ", [/pre] or equivalently (I tried both ways) [pre] p_orientation=" . to_sql($seekthis, "Number") . ", [/pre] these yield 0 in my the field named p_orientation the statement replaced [pre] p_orientation=" . to_sql(DB::result("SELECT search FROM const_orientation WHERE id=" . to_sql(get_session("j_orientation"), "Number")), "Number") . ", [/pre] this second statement was using a variable which has no more use, but did perform it's alotted function. if there are other relevant statements I am missing, please msg me if you can take a bit of time to help. Quote Link to comment https://forums.phpfreaks.com/topic/54673-in-over-my-head/ Share on other sites More sharing options...
btherl Posted June 8, 2007 Share Posted June 8, 2007 You forgot to ask your question Quote Link to comment https://forums.phpfreaks.com/topic/54673-in-over-my-head/#findComment-270400 Share on other sites More sharing options...
auctioninvestor Posted June 8, 2007 Author Share Posted June 8, 2007 hehe, oops, so I did, the question is how to I make the p_orientation take the value $seekthis what have I done wrong that makes $seekthis return '5' and database entry p_orientation set to '0' ?? Quote Link to comment https://forums.phpfreaks.com/topic/54673-in-over-my-head/#findComment-270408 Share on other sites More sharing options...
btherl Posted June 8, 2007 Share Posted June 8, 2007 I am unfamiliar with get_param() and to_sql(). Are those functions defined in your code somewhere? Or are they part of a library? Quote Link to comment https://forums.phpfreaks.com/topic/54673-in-over-my-head/#findComment-270410 Share on other sites More sharing options...
auctioninvestor Posted June 8, 2007 Author Share Posted June 8, 2007 get_param() I have found references too as part of a library the other is a rather simple lib function which can been see here: http://www.railsapi.org/activerecord-connectionadapters-tabledefinition-to_sql This was a purchase by a friend who spent $600 to get 95% of the functionality he wanted and I'm just trying to finish things off for him... Quote Link to comment https://forums.phpfreaks.com/topic/54673-in-over-my-head/#findComment-270416 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.