buzzard
Joined: 26 Feb 2009
Posts: 4
Posted: 2009-02-26 17:51
Back to top
Reply with quote
|
Hi all,
I've been using this class for some time now and I've managed to get everything working properly just by scanning the forum or reading the documentation.
However I now have an issue that nobody on here has mentioned so I'm wondering what it is that I have done wrong. I'm using the php option on one of my columns to display some HTML, (buttons to be precise), and I keep getting a number 1 displayed on every row of my table underneath the buttons that I want to display, and I have no idea why???
I know that it's nothing in my code on my php page, as I still get it even with a blank php page, just a column full of 1's. Somebody help please.......aaarrrghhh.....:-)
The column is an actual field in my database, but I've configured it to get it's value from the adjacent column, by using the sql option. There are no values in the database causing these to be displayed.
Config below:
$opts['fdd']['Data_Field'] = array(
'name' => 'Data Field Name',
'select' => 'T',
'php' => 'my.php',
'colattrs' => 'align="center"',
'options' => 'VL',
'sql|VL' => 'Adjacent Field',
'sort' => false
);
Please help?? Thank You.
|
doug
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2009-02-28 07:22
Back to top
Reply with quote
|
Check my.php for occurrences of = where you should be using == to check equality. Otherwise, the return value of something is probably TRUE which displays as 1. Also, a few PHP functions can return 1 if a required parameter is missing (like if the function expects 3 parameters and only 2 are passed). Check your error_log, maybe you'll get lucky and an error is logged.
|
buzzard
Joined: 26 Feb 2009
Posts: 4
Posted: 2009-03-01 04:01
Back to top
Reply with quote
|
Thanks Doug, but I still can't figure out where this 1 is coming from. It's definitely nothing in the 'my.php' file, as I have tested it with a blank page in the 'my.php' file, which produces exactly the same result i.e. just a column full of 1's only without my additional code?
This means that it can only be coming from the class file itself, my calling file or from the php.ini settings? I've gone through php.ini changing various settings, testing and re-testing and I've done the same with the class file, changing any 1 that I could find to 0 or 2 and if it had no effect I changed it back again.
I've gone through my webserver logs but I couldn't find asnything in there of interset either unfortunately.
I just find this really bizzare, that everything else has always worked fine and exactly as expected for me and all of a sudden I'm having, what seems to be a unique issue. Can anybody else out there please try and create a blank php page and call it in the options of a new database column and let me know if you experience the same thing - just so I can be sure that it must be me going mad :-)
I'm using the html cal popup class too, but I even tried just going via the standard class to eliminate that as a possible cause. Any feedback is greatly appreciated. Thanks a bunch for your time.
|
doug
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2009-03-01 06:03
Back to top
Reply with quote
|
If you post all the code from all scripts, then someone might spot the problem.
|
msavi
Joined: 26 Jan 2010
Posts: 10
Posted: 2010-07-11 12:52
Back to top
Reply with quote
|
did u find a solution to this. i am alsow having the same problem.
|
doug
Joined: 10 Feb 2003
Posts: 1013
Location: Denver, Colorado (USA)
Posted: 2010-07-11 14:14
Back to top
Reply with quote
|
Apparently no psychics have viewed this thread. Since no code has been posted, no one can see the problem. The "1" or "true" value probably results from successful execution of an "=" which instead should be "==".
|
msavi
Joined: 26 Jan 2010
Posts: 10
Posted: 2010-07-26 12:56
Back to top
Reply with quote
|
I found the solution in my script. it seemsthat in my php file if there is no return then a 1 is added as long as a return is added the one disappears.
|
buzzard
Joined: 26 Feb 2009
Posts: 4
Posted: 2013-03-13 16:05
Back to top
Reply with quote
|
msavi wrote: |
I found the solution in my script. it seemsthat in my php file if there is no return then a 1 is added as long as a return is added the one disappears. |
I know that it's been ages since my original post, but in case it helps anybody else, only the return would get rid of the 1 for me too.
|
Post new topic
Reply to topic
|