|
You last visited: Today at 19:09
Advertisement
[PHP]Mysql_Quer Syntax -.-
Discussion on [PHP]Mysql_Quer Syntax -.- within the Web Development forum part of the Coders Den category.
02/12/2012, 15:28
|
#1
|
elite*gold: 20
Join Date: May 2010
Posts: 2,792
Received Thanks: 1,988
|
[PHP]Mysql_Quer Syntax -.-
Mein alzeit am meist gehasster PHP Fehler ist wieder aufgetreten -.-
(Die dummen Mysql_query Syntax was nur ein scheiß schreibt)
Der query :
PHP Code:
INSERT INTO `crduser`.`costumer` SET `first_name` = '$this->first_name', `last_name` = '$this->last_name', `email` = '$this->email', `zip_code` = '$this->zip_code', `city` = '$this->city', `street` = '$this->street' `phone` = '$this->phone', `birthday` = '$this->birthday', `password` = PASSWORD('$this->password'), `secure_answer` = '$this->secure_answer', `secure_question` = '$this->secure_question', `costumer_number` = '$this->costumer_number', `activate_code` = '$this->activate_code', `user_status` = '$this->user_status', `user_admin` = '$this->user_admin'
Die DB:
PHP Code:
CREATE TABLE `costumer` ( `id` int(12) unsigned NOT NULL AUTO_INCREMENT, `first_name` varchar(22) NOT NULL, `last_name` varchar(22) NOT NULL, `zip_code` int(12) NOT NULL, `city` varchar(22) NOT NULL, `street` varchar(42) NOT NULL, `email` varchar(42) NOT NULL, `birthday` varchar(42) NOT NULL, `password` varchar(42) NOT NULL, `secure_question` int(10) NOT NULL, `secure_answer` varchar(42) NOT NULL, `user_status` int(10) NOT NULL, `user_admin` int(10) NOT NULL, `activate_code` varchar(60) NOT NULL, `voucher` int(10) NOT NULL, `costumer_number` varchar(60) NOT NULL, `phone` int(60) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
der Fehler
PHP Code:
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 '`phone` = '0****', ` birthday` = '17/**/****', `pass' at line 10
|
|
|
02/12/2012, 15:46
|
#2
|
elite*gold: 0
Join Date: Jun 2010
Posts: 3,407
Received Thanks: 2,024
|
PHP Code:
`street` = '$this->street'
da fehlt ein , wobei ich es immer anderst mache
Wieso machst du es nicht einfach über
PHP Code:
INSERT INTO table (spalte1,spalte2) VALUES ('spalte1val', 'spalte2val')
finde es so übersichtlicher
|
|
|
02/12/2012, 15:49
|
#3
|
elite*gold: 20
Join Date: May 2010
Posts: 2,792
Received Thanks: 1,988
|
das Komma war es ^^ oh man FAIL
|
|
|
|
Similar Threads
|
at&t syntax
09/21/2011 - General Coding - 8 Replies
hmmm... ich wusste zwar dass die at&t syntax (meiner meinung nach) nichts schönes is.... aber is die so anders?
__asm("mov eax, fs:");
__asm("mov eax, ");
__asm("mov edx, eax");
__asm("add eax, 0xeeeeeeee"); // platzhalter!
__asm("push eax");
hier bekomm ich fehler für: mov eax, - too many memory references for 'mov' | invalid char ''
|
#insert_item Right Syntax
07/24/2011 - Rappelz - 9 Replies
the right syntax for the insert_item function :
#insert_item(ID,howmuch,+,level,flag,"YourNa me")
example :
#insert_item(540100,1,20,10,2,"Strean")
description :
|
Syntax?
02/14/2011 - AutoIt - 26 Replies
Hey Leute,
gibt es in diesem Programm, rein syntaktisch gesehen irgendwelche Fehler, weil Imagesearch, keins der Bilder identifizieren kann?
Dim $myPics
$myPics = 14
$myPics = '1.bmp'
$myPics = '2.bmp'
$myPics = '3.bmp'
$myPics = '4.bmp'
$myPics = '5.bmp'
|
[HELP] C# WPF syntax
12/23/2010 - CO2 Programming - 14 Replies
Does anyone knows how to convert or what's the right syntax on this C# form application syntax?
webBrowser1.Document.GetElementById("name&quo t;).SetAttribute("value", textBox2.Text);
webBrowser1.Document.GetElementById("message& quot;).SetAttribute("value", textBox1.Text);
webBrowser1.Document.GetElementById("sumbit&q uot;).InvokeMember("click");
i'm having error on "GetElementById" :S just confused.
|
[FRAGE] php Syntax
09/17/2010 - Flyff Private Server - 1 Replies
Hi,
könnte mir bitte jemand hier weiterhelfen .Möchte eine Rankingtabelle machen in der die Teammitglieder nicht angezeigt werden so nach der Art :
<?
require('./configs/reg_conf.php');
mssql_select_db("ACCOUNT_DBF");
if ('m_chLoginAuthority' == F) {
echo "wird in Tabelle angezeigt";}
else
|
All times are GMT +2. The time now is 19:09.
|
|