GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Tech Tips for coders vol. 2 (https://gfy.com/showthread.php?t=1339980)

redwhiteandblue 01-04-2021 11:13 AM

Tips for coders vol. 2
 
When writing MySQL queries try to make sure you can spot the difference between a comma and a semi-colon, so that you don't spend an hour shouting at the screen and end up going "NO I HAVEN'T got a FUCKING error in my FUCKING syntax you USELESS PIECE OF UTTER FUCKING SHI........oh wait, yes I have".

k33n 01-04-2021 12:53 PM

#1064 is the worst error code 😂

Colmike9 01-04-2021 02:49 PM

Quote:

Originally Posted by redwhiteandblue (Post 22799153)
When writing MySQL queries try to make sure you can spot the difference between a comma and a semi-colon, so that you don't spend an hour shouting at the screen and end up going "NO I HAVEN'T got a FUCKING error in my FUCKING syntax you USELESS PIECE OF UTTER FUCKING SHI........oh wait, yes I have".

This was me for the past week, missed one fucking line and couldn't figure out why things weren't working. :upsidedow

Klen 01-04-2021 02:51 PM

Well, let me give you pro tip - you can use command php -l for syntax errors and it tells you exact line where you have error. So i dont have such problems ever.

Colmike9 01-04-2021 02:53 PM

Quote:

Originally Posted by Klen (Post 22799257)
Well, let me give you pro tip - you can use command php -l for syntax errors and it tells you exact line where you have error. So i dont have such problems ever.

Mine wasn't syntax, though, I just forgot a line completely, so no debugging or color coded editors helped :upsidedow

redwhiteandblue 01-04-2021 03:53 PM

Quote:

Originally Posted by Klen (Post 22799257)
Well, let me give you pro tip - you can use command php -l for syntax errors and it tells you exact line where you have error. So i dont have such problems ever.

That doesn't tell you about SQL syntax errors inside a MySQL query string. MySQL does, but it can sometimes be a bit vague about where it is, but it does help if you realize that you are not infallible and you do make typos and it's not the computer being stupid :1orglaugh

Klen 01-04-2021 03:57 PM

Quote:

Originally Posted by redwhiteandblue (Post 22799280)
That doesn't tell you about SQL syntax errors inside a MySQL query string. MySQL does, but it can sometimes be a bit vague about where it is, but it does help if you realize that you are not infallible and you do make typos and it's not the computer being stupid :1orglaugh

That can be debugged easily too, copy paste your query, insert bogus data, and see what is mysql telling you. Tho you do have a point, very often things like ' " etc can fuck up query.


All times are GMT -7. The time now is 03:22 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123