[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4586: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4588: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4589: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4590: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
Xataface Forums • View topic - Value-lists with SQL query - syntax on my end...

Value-lists with SQL query - syntax on my end...

A place for users and developers of the Xataface to discuss and receive support.

Value-lists with SQL query - syntax on my end...

Postby mike.jones » Fri Feb 15, 2013 12:13 pm

mike.jones
 
Posts: 12
Joined: Mon Feb 11, 2013 9:17 pm

Re: Value-lists with SQL query - syntax on my end...

Postby auphi » Fri Feb 15, 2013 2:30 pm

Hmm... I don't see anything wrong either. Maybe someone else will catch the error though...

In the meantime try simplifying your sql code and then add things back in gradually to see where it breaks, i.e. try:

__sql__ = "SELECT TeacherID FROM 2013teachers"

if that works, then

__sql__ = "SELECT TeacherID, TeacherName FROM 2013teachers"

then

__sql__ = "SELECT TeacherID, TeacherName FROM 2013teachers ORDER BY TeacherName"

and maybe that will help you at least identify where the problem is.
auphi
 
Posts: 20
Joined: Sun Oct 21, 2012 7:39 pm

Re: Value-lists with SQL query - syntax on my end...

Postby mike.jones » Fri Feb 15, 2013 3:51 pm

Sounds good - I'll give that a whirl and see where I end up. :D
mike.jones
 
Posts: 12
Joined: Mon Feb 11, 2013 9:17 pm

Re: Value-lists with SQL query - syntax on my end...

Postby mike.jones » Mon Feb 18, 2013 7:01 am

No joy - tried various combinations, but alas, nothing seemed to work. Will dig into the PHP source next, I guess. Way over my head, but that's how your learn, right? :D

FWIW, the SQL query worked w/o any errors in phpMYadmin - so there seems to be something incorrect with my fields.ini and valuelists.ini files...

http://www.swmobridgecontest.org/cms/contest/

After some more massaging, the teacher names will show up in the TeacherID field in the 2013contestants table - but whenever I try to add a new records in the 2013contestants table, I get the PHP/SQL error described above.
mike.jones
 
Posts: 12
Joined: Mon Feb 11, 2013 9:17 pm

Re: Value-lists with SQL query - syntax on my end...

Postby shannah » Tue Feb 19, 2013 1:41 pm

The SQL parser looks like it's choking on the table name "2013teachers". This is likely because it begins with a number so the parser thinks it is just a number. You can help out the parser by using backticks "`' around the table name so that it knows you want it to be an identifier. E.g.
SELECT TeacherID FROM `2013teachers`

Steve
--
Steve Hannah
(on twitter)
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Value-lists with SQL query - syntax on my end...

Postby mike.jones » Tue Feb 19, 2013 6:36 pm

Wow, that was it! :D

I owe you a coffee or something. :mrgreen:
mike.jones
 
Posts: 12
Joined: Mon Feb 11, 2013 9:17 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 2 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved