PDA

View Full Version : Using "trim" not working anymore?


gopherhockey
12 Nov 2005, 19:14
A person wrote a system that allowed us to update mountain bike trail conditions on a single page - displaying all our trails and a quick condition next to each one.

This was written a while ago and I was able to get it working with vb 3.0 - but now the new 3.5 broke it again.

I went in and replaced a bunch of $db calls and it seems to display just fine. However, when i click on a trail to edit the condition the script does not seem to pull out the action of "edit"

Here is the snip of code that I think is not working and how it is called:

Called via:

Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------







Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



The action is always set to "showtrail" so somehow it seems the trim function is not changing the $action variable correctly.

Can someone help?

Its probably pretty obvious I'm no coder and its a real mess...

calorie
12 Nov 2005, 19:47
It's not the trim function; it's because $action isn't set:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

gopherhockey
12 Nov 2005, 23:10
I'll give that a shot. Thanks!

Looks like I'm getting farther along now in the script. It now sees edittrail - thanks.

Now I get an error I hope someone can help me through. The error is:

Invalid SQL:
SELECT descript FROM conditiontrail_general WHERE generalid=;

The code on the line that generates this is:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------