buzzard
Založený: 26.02.2009
Príspevky: 4
Zaslal: 2009-02-26 17:51
Návrat hore
Odpovedať s citátom
|
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
Založený: 10.02.2003
Príspevky: 1013
Bydlisko: Denver, Colorado (USA)
Zaslal: 2009-02-28 07:22
Návrat hore
Odpovedať s citátom
|
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
Založený: 26.02.2009
Príspevky: 4
Zaslal: 2009-03-01 04:01
Návrat hore
Odpovedať s citátom
|
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
Založený: 10.02.2003
Príspevky: 1013
Bydlisko: Denver, Colorado (USA)
Zaslal: 2009-03-01 06:03
Návrat hore
Odpovedať s citátom
|
If you post all the code from all scripts, then someone might spot the problem.
|
msavi
Založený: 26.01.2010
Príspevky: 10
Zaslal: 2010-07-11 12:52
Návrat hore
Odpovedať s citátom
|
did u find a solution to this. i am alsow having the same problem.
|
doug
Založený: 10.02.2003
Príspevky: 1013
Bydlisko: Denver, Colorado (USA)
Zaslal: 2010-07-11 14:14
Návrat hore
Odpovedať s citátom
|
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
Založený: 26.01.2010
Príspevky: 10
Zaslal: 2010-07-26 12:56
Návrat hore
Odpovedať s citátom
|
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
Založený: 26.02.2009
Príspevky: 4
Zaslal: 2013-03-13 16:05
Návrat hore
Odpovedať s citátom
|
msavi Napísal: |
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.
|
Odoslať novú tému
Odpovedať na tému
|