Hi
I am using DB_dataobjects and pear .
I noticed that for some of my tables my insert statement doesnt work correclty ..
Those tableas are tables that i changed recently (i removed the space and added "_" and now i removed the underscore also)
So this is the output -
DataObjects_test: CONNECT: Checking for database database_ in options
-
DataObjects_test: CONNECT: NEW CONNECTION
-
DataObjects_test: CONNECT: mysql://root:pvcllc@localhost/testdb 3f7988ed345b6d7c1c02f017c09f70b9
-
DataObjects_test: CONNECT: a:1:{s:32:"3f7988ed345b6d7c1c02f017c09f70b9";O:8:"DB_mysql":8:{s:10:"autocommit";b:1;s:8:"dbsyntax";s:5:"mysql";s:3:"dsn";a:9:{s:7:"phptype";s:5:"mysql";s:8:"dbsyntax";s:5:"mysql";s:8:"username";s:4:"root";s:8:"password";s:6:"pvcllc";s:8:"protocol";s:3:"tcp";s:8:"hostspec";s:9:"localhost";s:4:"port";b:0;s:6:"socket";b:0;s:8:"database";s:8:"testdb";}s:8:"features";a:7:{s:5:"limit";s:5:"alter";s:8:"new_link";s:5:"4.2.0";s:7:"numrows";b:1;s:8:"pconnect";b:1;s:7:"prepare";b:0;s:3:"ssl";b:0;s:12:"transactions";b:1;}s:9:"fetchmode";i:1;s:22:"fetchmode_object_class";s:8:"stdClass";s:7:"options";a:8:{s:16:"result_buffering";i:500;s:10:"persistent";b:0;s:3:"ssl";b:0;s:5:"debug";i:0;s:14:"seqname_format";s:6:"%s_seq";s:8:"autofree";b:0;s:11:"portability";i:0;s:8:"optimize";s:11:"performance";}s:13:"was_connected";b:1;}}
-
DataObjects_test: QUERY: INSERT INTO test (Name , Surname , Address , Country ) VALUES ('' , '' , '' , '-1' )
-
DataObjects_test: query: QUERY DONE IN 0.00115609169006 seconds
-
Notice that in the insert statement you only have Name,Surname,Address,Country... -
$test = new DataObjects_test;
-
DB_DataObject::debugLevel(5);
-
-
session_start();
-
-
$test->Name=$_REQUEST['name'];
-
$test->Surname=$_REQUEST['surname'];
-
-
-
$test->Address=$_REQUEST['address'];
-
$test->Country=$_REQUEST['country'];
-
$test->Addedby=$_SESSION['user'] ;
-
$test->Date_Added=date("d/m/y");
-
But you dont have Date_Added and Addedby .. i think it might be somnething to do with the character encoding in the particular columns but not sure.. i renamed the tables using MySQL GUI Querty manager
and here are the tables in question -
DROP TABLE IF EXISTS `testdb`.`test`;
-
CREATE TABLE `testdb`.`test` (
-
`Name` varchar(50) default NULL,
-
`Surname` varchar(50) character set utf8 default NULL,
-
`Address` varchar(50) default NULL,
-
`Country` varchar(50) character set utf8 default NULL,
-
`City` varchar(50) character set utf8 default NULL,
-
`Phone Landline` varchar(50) character set utf8 default NULL,
-
`Genre` varchar(50) character set utf8 default NULL,
-
`Email` varchar(200) character set utf8 default NULL,
-
`Rates` varchar(50) character set utf8 default NULL,
-
`Extra Info` varchar(50) character set utf8 default NULL,
-
`Web Address` text character set utf8,
-
`Proffesion` varchar(50) character set utf8 default NULL,
-
`Phone Mobile` varchar(50) character set utf8 default NULL,
-
`Address Street` varchar(50) character set utf8 default NULL,
-
`Adress Postcode` varchar(50) character set utf8 default NULL,
-
`Nickname` varchar(50) character set utf8 default NULL,
-
`Description/Other Info` varchar(100) character set utf8 default NULL,
-
`Addedby` varchar(50) default NULL,
-
`Date_Added` varchar(50) default NULL,
-
`Date Contacted` varchar(50) character set utf8 default NULL,
-
`Picture` varchar(50) character set utf8 default NULL,
-
`Id` int(10) unsigned NOT NULL auto_increment,
-
PRIMARY KEY (`Id`)
-
) ENGINE=MyISAM AUTO_INCREMENT=1190 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
-
Any help will be really appreciated
Thanks
2 1797
This is not very helpful
I noticed that for some of my tables my insert statement doesnt work correclty
I can't see an INSERT query.
Nevertheless this output - INSERT INTO test (Name , Surname , Address , Country ) VALUES ('' , '' , '' , '-1' )
Seems to indicate that your REQUEST array is empty
Hi
Thanks for the reply
The problem was thet i modified the database but i havent generated the classs for the newly modfied tabels that why the insert didnt work :-)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Philip Hachey |
last post by:
I think this is do-able, and possibly even simple, but it's been too
many years since I've done anything significant with SQL. Any help
would be appreciated.
I have two tables, PAY and CHG. ...
|
by: Rowan |
last post by:
Hello,
I am having a problem with a join. Either I am just not seeing the
obvious, it isn't possible, or I need to use a different approach. I
have an application with a vsflexgrid that needs...
|
by: Spark |
last post by:
Hi,
Situation:
Need a query to return number of ticket records by month of open in a
log table where the ticket open record is older than 24 hours then the
ticket pending or ticket closed...
|
by: Christian Christmann |
last post by:
Hi,
I've a class htable.cpp with a private member: map<string, void*>
stringhash;
and a function:
"void HashTable::Insert(char* ky,void* entr) {
strhash.insert(pair<string, void*>(ky,...
|
by: Mark P |
last post by:
Some time ago I posted here about inserting into a set with a hint:
...
|
by: Myron |
last post by:
I'm trying to create a query that will tell me which requests
took longer than 10 days to move one from particular state to another
state. The query I've created returns the correct requests,
but...
|
by: Driesen via SQLMonster.com |
last post by:
Hi guys
I having trouble with this sproc. I get the following error when testing:
Server: Msg 245, Level 16, State 1, Procedure UTL_CompletenessCheckLoan, Line
231
Syntax error converting the...
|
by: Chris Kratz |
last post by:
Hello all,
We have run into what appears to be a problem with rules and subselects in
postgres 7.4.1. We have boiled it down to the following test case. If
anyone has any thoughts as to why...
|
by: Ganon11 |
last post by:
Hey guys,
OK, taking care of this beforehand; I AM a student in a university. This IS part of my homework, and (as a moderator), I'm doing my best to follow the posting guidelines I work so hard...
|
by: panos100m |
last post by:
Hi
I am using DB_dataobjects and pear .
I noticed that for some of my tables my insert statement doesnt work correclty ..
Those tableas are tables that i changed recently (i removed the space...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |