Re: re:php debugging skills

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Though I do not profess to be a MySQL expert, INSTERT will definitely mess things up for you as will the s at the end of values, given that you are inserting multiple values :)

Richard.

----- Original Message -----
From: Jason Pruim <japruim@xxxxxxxxxx>
Date: Friday, September 26, 2008 6:39 pm
Subject: Re:  re:php debugging skills

> 
> On Sep 26, 2008, at 1:17 PM, muhsin wrote:
> 
> > Jason Pruim wrote:
> >>
> >> On Sep 26, 2008, at 11:22 AM, muhsin wrote:
> >>
> >>> Could you guys share your development setup, like what kinds 
> of  
> >>> software (IDE's/Editors) you are using for developing php scripts?
> >>> It might sound silly but I am just curios, as I just got 
> started  
> >>> in php programming en i have firefox + kate/bluefish + LAMP 
> built  
> >>> with gentoo.
> >>> Im mostly thinking that with only firefox and some logs left 
> /var/ 
> >>> log or so, its not enough for me..Im looking for something 
> like an  
> >>> IDE which can allow me to debug code in steps in central 
> manner  
> >>> approach (ide), simplicity and efficiency...u know what i 
> mean? :-D
> >>>
> >>> Just kiddin bout simplicity ;-)
> >>>
> >>
> >>
> >> this has been discussed quite a bit over the years, but I just  
> >> thought I'd pipe up since I was in your spot a little over a 
> year  
> >> ago...  What I did then, and still do when I can't figure it 
> out  
> >> from the error log is just a lot of echo "N"; through the  
> >> application. That way, when I see it makes it to 5 but not 6 I  
> >> check the code between 5 and 6 and I can usually spot the 
> problem  
> >> now.
> >>
> >> If nothing else, it'll help you narrow down the problem before  
> >> asking questions here which most people are more then happy to 
> do :)
> >>
> >> Also... If you are dealing with databases (Since this is the DB 
> 
> >> list :)) I'd recommend to echo out your db statements to make 
> sure  
> >> you are doing what you think you are doing... Can't tell you 
> how  
> >> many times that screwed me up...
> >>
> >> Just my experience, take it or leave it :)
> >>
> >>
> >> -- 
> >>
> >> Jason Pruim
> >> Raoset Inc.
> >> Technology Manager
> >> MQC Specialist
> >> 11287 James St
> >> Holland, MI 49424
> >> www.raoset.com
> >> japruim@xxxxxxxxxx
> >>
> >>
> >>
> >>
> >>
> > Thanks Jason,
> >
> > Actually its a Db/mysql-5.0.60-r1 issue which makes me wonder 
> about  
> > debugging techniques php.
> > Im stuck with this on my early scripts that im 
> experimenting.These  
> > are the echo of the SQL part:
> >
> > INSERT INTO movietype (movietype_id, movietype_label) VALUE (1, 
> 'Sci  
> > Fi'), (2, 'Drama'), (3, 'Adventure'), (4, 'Comedy'), (5, 
> 'Horror'),  
> > (6, 'Action'), (7, 'Kids')
> >
> > INSTERT INTO people (people_id, people_fullname, people_isactor, 
> 
> > people_isdirector) VALUE (1, 'Jim Carrey', 1, 0), (2, 'Tom 
> Shadyac',  
> > 0, 1), (3, 'Lawrence Kasdan', 0,1), (4, 'Kevin Kline', 1, 0), 
> (5,  
> > 'Ron Livingston', 1, 0), (6, 'Mike Judge', 0, 1)
> > 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 'INSTERT INTO people (people_id, people_fullname,  
> > people_isactor, people_isdirect' at line 1
> >
> > Followed by:
> > Duplicate entry '1' for key 1
> >
> > And i just can narrow down whats hapenning on that part, which 
> one  
> > of my early scripts ...any idea?
> > The error is probably related the 2nd dB statement , but i cant  
> > figure out whats making it throwing error :-
> >
> 
> Looking at it the first thing that stands out to me is the way you 
> are  
> breaking up the values... If I was doing it, my insert would look  
> like: INSERT INTO people (people_id, people_fullname, 
> people_isactor,  
> people_isdirector) VALUES ("1", "Jim Carrey", "1", "0");
> 
> Notice also that I used the keyword VALUES (The S on the end) and 
> a  
> semi colon on the end of the line, it may be there, but it didn't 
> come  
> through :)
> 
> One other thing to try is to try and submit that directly to the  
> database... See if that gives you any other errors which 
> occasionally  
> happens.
> 
> 
> --
> 
> Jason Pruim
> Raoset Inc.
> Technology Manager
> MQC Specialist
> 11287 James St
> Holland, MI 49424
> www.raoset.com
> japruim@xxxxxxxxxx
> 
> 
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux