There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Solved: mysql query error


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
snorkytheweasel's Avatar
Computer Specs
Senior Member with 133 posts.
 
Join Date: May 2006
Experience: UNIX/VMS:Elder Geek; DOS/Windows:Fossil
17-Jul-2008, 11:41 AM #1
Solved: mysql query error
mysql 4.x on linux

Some query errors generate an error message. I have no problem with that - I can usually find my oopsie and fix it.

However, some syntax errors do not generate a message; instead, they present a prompt that seems to accept no input and won't allow me to break out of the query. So far, my only way out is CTRL-C, which kicks me out of mysql. From there I can login to mysql, execute a 'use db' statement, and go back to work.

Surely there is a way out of that 'you screwed up and now I'm going to taunt you" prompt.

Here's an example:
mysql> update personnel set fname=Roxanne" where id="318";
The error is that I omitted the 1st quote mark in front of the value for column fname.

mysql returns the following prompt:
" >

Then begins my descent into purgatory. How should I respond to break out of that loop and go back to what I was doing before my mistake?
snorkytheweasel's Avatar
Computer Specs
Senior Member with 133 posts.
 
Join Date: May 2006
Experience: UNIX/VMS:Elder Geek; DOS/Windows:Fossil
17-Jul-2008, 12:45 PM #2
And the answer is [drumroll, please]
  1. When the mystery prompt says "> , it is looking for a quotation mark
  2. At the prompt, enter the quotation mark
  3. type in a semi-colon (to terminate the entry
  4. mash down the ENTER key

That breaks out of the error without crashing through mysql. However, it does not fix the bad query. You have to do that by repeating the query (use up arrow) and correcting the flaw.
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 01:59 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.