Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 9th, 2012, 10:20 AM
Registered User
 
Join Date: Feb 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default creating a database of persons on php-mysql

Hello
I'm using "PHPRunner" to build a Database for persons.
the structure of the database is in this picture

I have the following code:
PHP Code:
SELECT
test
.Nom,
test.Prenom,
test.`N°`,
test.Idtitle,
test.Idposition,
test.IdInstitution,
test.IdDepartment,
test.Adresse,
test.ZIP,
test.Idcity,
test.Idcountry,
test.Phone_number,
test.GSM,
test.Fax,
test.Email,
titre.Title,
`
position`.Position_en,
pays.Country,
institution.Institution,
departement.Departement,
city.City,
GROUP_CONCAT(language.Langue ORDER BY language.Langue SEPARATOR ';') AS languesParlees
FROM test
INNER JOIN titre ON test
.Idtitle titre.`N°`
INNER JOIN city ON test.Idcity city.Idcity
INNER JOIN departement ON test
.IdDepartment departement.IdDepartment
INNER JOIN institution ON test
.IdInstitution institution.Idinstit AND departement.Idinstit institution.Idinstit
INNER JOIN 
`positionON test.Idposition = `position`.Idposotion
INNER JOIN pays ON test
.Idcountry pays.Idpays AND institution.idpays pays.Idpays AND city.Idpays pays.Idpays
INNER JOIN rel_lang_pers ON test
.`N°` = rel_lang_pers.IdPersons
INNER JOIN 
`languageON rel_lang_pers.Idlanguage = `language`.`N°`
GROUP BY test.Nomtest.Prenom
ORDER BY test
.Nomtest.Prenom
i manually added the lines:
PHP Code:
GROUP_CONCAT(language.Langue ORDER BY language.Langue SEPARATOR ';') AS languesParlees 
and
PHP Code:
GROUP BY test.Nomtest.Prenom
ORDER BY test
.Nomtest.Prenom
Unfortuantely, when trying to view my database on firefox, i have the following error code:
Quote:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; AS `test.Prenom;` FROM test INNER JOIN titre ON test.Idtitle = titre.`N°` I' at line 1
the file containing the error is said to be:
the error line is number 40

Could any one help me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
calling a php function to access a MySQL database from javascript the_metro_man Javascript How-To 0 January 12th, 2010 12:26 PM
Database driven information(PHP,Mysql) rajajaaneman Beginning PHP 2 February 13th, 2009 07:25 AM
entering £ (pound sign) into MySQL database - PHP crmpicco PHP Databases 1 November 14th, 2007 02:02 AM
create database in mysql through php coding vivekananth PHP Databases 2 January 31st, 2007 01:48 AM
Interfacing PHP/MYSQL to existing Database... mekh Pro PHP 6 February 8th, 2004 06:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.