Jump to content
Larry Ullman's Book Forums

Recommended Posts

I have been making some progress with 'Chapter 6' of 'PHP and MySQL for', however I am having increasing problems with the 'cursor'. [->] is the opening for every new line, however ['>] signals the end of the system accepting any commands, not even 'exit'. The only option as far as I can determine is to click the red button with the 'white' X, and loggin again with 'mysql.exe'. Might there be a quickfix for this 'affliction'? I may change to a 'macbook' sometime soon, if things prove too irksome on 'Windows'. Any advice is very welcome thanks.

 

regards

 

John

Link to comment
Share on other sites

The '> cursor means that you're in the middle of a string. In other words, you've started a string with a ' but haven't closed it yet. All the other things you're typing end up being part of that string. Just enter ' and then \c to clear the command and start again.

 

Things like this can sure be confusing!

Link to comment
Share on other sites

Hi Larry,

thanks for the advice, which got the system going again thankfully! However I got an error message;

ERROR:

\c charset_name: charset charset_name

I certainly could type the command [;] in the next line, but the system seemed to take this as a fatal error, thus I have to start at the beginning once again! If there is a way around this problem, please let me know. I did not go to university back then, so these manuals are very helpful in the modern age I feel. Thanks again.

 

kind regards

 

John

Link to comment
Share on other sites

Hi, here is the latest; '> I can't get the first calculator

-> example to work. When I submit

-> the form...', UTC_TIMESTAMP());

'> '\c

mysql>

 

AS you can observe I cannot force the system to accept the {;} command. I don't think going round in circles is acceptable! I have studied "F" on page 192, and other than the screen being from an 'Apple' OS, I cannot deduce anything different from my own laptop. Any further advice is welcome thanks.

 

kind regards

 

John

Link to comment
Share on other sites

Not sure what you mean by "I don't think going round in circles is acceptable!", but on your very first line you have '> as the prompt, which means that the client thinks it's currently already within a string. The ' in can't closes that string, creating an error.

 

Have you considered just using phpMyAdmin or another interface since you're having such difficulties with the command line mysql?

Link to comment
Share on other sites

 Share

×
×
  • Create New...