Is their something here that I never knew?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Is their something here that I never knew?

Post by BDKR »

I'm inserting a string into a varchar field. That string is essentially numbers that are delimited with a ":". Is there something about using this that I don't know about? The reason for my asking being that even though the query succeeds, this field always comes back empty.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Is their something here that I never knew?

Post by Christopher »

Are you sure the insert is actually succeeding?
(#10850)
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Re: Is their something here that I never knew?

Post by greyhoundcode »

Proper use of quotes within the query?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Is their something here that I never knew?

Post by John Cartwright »

Also try to echo the query out before sending it to the database, as arborint suggested, it might not be what you think.
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Re: Is their something here that I never knew?

Post by BDKR »

arborint wrote:Are you sure the insert is actually succeeding?

Yeah, I'm sure. :wink:

Oh well. I'll keep :banghead: for now. I actually have another solution that I'll work on for the short term.
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: Is their something here that I never knew?

Post by jayshields »

Post the exact query being sent to MySQL.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Is their something here that I never knew?

Post by Christopher »

BDKR wrote:
arborint wrote:Are you sure the insert is actually succeeding?

Yeah, I'm sure. :wink:
I guess I am not clear on what "this field always comes back empty" means. The INSERT will not return any data. Are you saying that later SELECTing the record return an empty field?
(#10850)
User avatar
BDKR
DevNet Resident
Posts: 1207
Joined: Sat Jun 08, 2002 1:24 pm
Location: Florida
Contact:

Re: Is their something here that I never knew?

Post by BDKR »

arborint wrote:
BDKR wrote:
arborint wrote:Are you sure the insert is actually succeeding?

Yeah, I'm sure. :wink:
I guess I am not clear on what "this field always comes back empty" means. The INSERT will not return any data. Are you saying that later SELECTing the record return an empty field?
My bad. It's not an INSERT. It's a SELECT.
Post Reply