Forums

parse error and other things

jeel2008 30 Jan, 2009
hello, im a complete newbie concerning chronoconnectivity and im having a few questions.

first of all:

i get this parse error:

Parse error: syntax error, unexpected '.', expecting ',' or ';' in /home/vhosts/mysite.nl/httpdocs/joomla/components/com_chronoconnectivity/chronoconnectivity.php(27) : eval()'d code on line 7 (see fig. 1).

what went wrong?

when ive saved the form and i click show data the same parse error appears and no data at all are shown (see fig. 2).
but i know there's data stored in this table.

the other question will soon follow, im afraid.

thanks, Jeel2008, the netherlands

ps i 've just made a link on my website directly to the form.
this is the result: see fig 3.
no data are show.
why am i having the impression that im completely missing the point, one way or another?
GreyHead 30 Jan, 2009
Hi jeel2008,

That eval()'d code on line 7 refers to the code in one of the ChronoConnectivit input boxes. Take a look around line 7 (could be 5-9 in real lines and tell us what you see.

Bob
jeel2008 30 Jan, 2009
Hi Bob, ive looked up the file chronoconnectivity.php,
and i cant imagine its line 7. thats only comment!

this is the beginning of the file code, the first 52 lines:

<?php
/**
* CHRONOCONNECTIVITY version 1.0 stable
* Copyright (c) 2008 Chrono_Man, ChronoEngine.com. All rights reserved.
* Author: Chrono_Man (ChronoEngine.com)
* See readme.html.
* Visit http://www.ChronoEngine.com for regular update and information.
**/

/* ensure that this file is called by another file */
defined('_JEXEC') or die('Restricted access');



/**
* Load the HTML class
*/
require_once( JApplicationHelper::getPath( 'front_html' ) );
require_once( JApplicationHelper::getPath( 'class' ) );

jimport( 'joomla.application.component.controller' );
global $mainframe;
$database =& JFactory::getDBO();
$database->setQuery( "SELECT * FROM #__chronoconnectivity" );
$cconnections = $database->loadObjectList();
foreach($cconnections as $cconnection){
eval ("?>".$cconnection->ClassCode);
}

require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();

switch( $task ) {
case 'showlist':
showlist();
break;
case 'deleterecord':
deleterecord($option);
break;
case 'editrecord':
case 'newrecord':
editrecord($option);
break;
case 'saverecord':
saverecord($option);
break;
default:
showmainlist();
break;
}
Max_admin 30 Jan, 2009
Hi jeel,

I think your table fields names are not fine, this is what the error is about, can I see SQL code for your table ? does any table field name has "-" or any strange characters or is starting with a number ?

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jeel2008 30 Jan, 2009
hello Max,

thanks for you reply.
i did not spot any strange characters, its all seems pretty normal to me.
as long as the parser can handle dutch words...😑
you can see the sql code in the attached file.

Jeel2008
Max_admin 30 Jan, 2009
mmm, then I will need to look at the code, please find this connection's record in the jos_chrono_connectivity table and show me the code under ClassCode field!

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jeel2008 31 Jan, 2009
hi max,

its all abacadabra for me...
ive found the jos_connectivity table, (see fig. 1 ) , i guess, but how can i view the code?

Jeel2008
Max_admin 01 Feb, 2009
Hi Jeel,

Ok good, the field ClassCode has some Code for this connection record, can you copy it and paste here ?

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jeel2008 03 Feb, 2009
hi max,
i surely would if i only knew how and where to find it.
ive been looking in the chronoconnectivity.php file, and the only peace of code around classcode ive found has been:

jimport( 'joomla.application.component.controller' );
global $mainframe;
$database =& JFactory::getDBO();
$database->setQuery( "SELECT * FROM #__chronoconnectivity" );
$cconnections = $database->loadObjectList();
foreach($cconnections as $cconnection){
eval ("?>".$cconnection->ClassCode);
}

require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
$mainframe =& JFactory::getApplication('site');
$mainframe->initialise();

but this is surely not what you intended?

wait a minute:
this is what ive found in phpmyadmin in the field classcode:

<?php
if (!class_exists('Tableclubs')) {
class Tab...

for the table Clubs

------------------------

and this:

for the table Voetballers

<?php
if (!class_exists('TableVoetballers')) {
cla...

---------------

wait, this would be probably what you are looking for: (via search - select fields).

<?php
if (!class_exists('TableVoetballers')) {
class TableVoetballers extends JTable {
var $id = null;
var $achternnaam = null;
var $voornaam = null;
var $geb. = null;
var $cv = null;
var $clubs als speler = null;
var $clubs overige functies = null;
function __construct( &$database ) {
parent::__construct( 'Voetballers', 'id', $database );
}
}
}
?>

or, the other table:

<?php
if (!class_exists('Tableclubs')) {
class Tableclubs extends JTable {
var $id = null;
var $naam = null;
var $oprichting = null;
var $stad = null;
var $stadion = null;
var $palmares = null;
var $bijzonderheden = null;
function __construct( &$database ) {
parent::__construct( 'clubs', 'id', $database );
}
}
}
?>
Max_admin 03 Feb, 2009
Good!! one of the tables has illegal fields names with a space or a dot :

var $geb. = null;
var $cv = null;
var $clubs als speler = null;
var $clubs overige functies = null;


this must be fixed!

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jeel2008 04 Feb, 2009
hi max,
ok thanks, i will look at it soon.
Jeel2008
jeel2008 04 Feb, 2009
HELLO Max,
i figured it out thanks to your help. (see max3.jpg).

but stil im not where i want to be.

1. my goal was to let people search my database by a query.

for example, a little inputbox would show up:
search on: achternaam (second name) - inputbox
and then they can type a name for example: Jansen.

and: search on club: inputbox
for example: PSV

now the query go find AND display all the players called Jansen who played for PSV.

2. if possible with a picture. e.g. a thumbnail that can be resized.

can these two things be realized with Chronoconnectivity?

Jeel2008
Max_admin 04 Feb, 2009
Hi Jeel2008,

this is possible, you need to add the fields to the header and tune your WHERE code alittle with PHP, some user has posted this here few days ago, please look at the recent posts and let me know!

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.