Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-19-2009, 07:47 PM   PM User | #1
Phil Jackson
Senior Coder

 
Join Date: Aug 2009
Location: Mansfield, Nottinghamshire, UK
Posts: 1,547
Thanks: 57
Thanked 148 Times in 147 Posts
Phil Jackson is on a distinguished road
gonna cry...

Cant believe i've godda ask this but can someone see something my tiered eyes can't.

PHP Code:
$linkFromRoot mysql_real_escape_string($linkFromRoot);
mysql_query("INSERT INTO `pageUpdates` ('table_name') VALUES ('$linkFromRoot')") or die(mysql_error()); 

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 ''table_name') VALUES ('public_html/about-us-the-mobile-makeover.php')' at line 1

no matter seen it as i posted it
__________________
Website Design Mansfield
PHP Code:
function I_LOVE(){function b(&$b='P'){$b.='P';}function a($_){return $_++;}$b='P';define("B",'H');b($b=implode('',array($b=a($b),$b=a(B))));b($b);return $b;}
echo 
I_LOVE(); 

Last edited by Phil Jackson; 10-19-2009 at 08:33 PM..
Phil Jackson is offline   Reply With Quote
Old 10-19-2009, 07:57 PM   PM User | #2
mlseim
Master Coder

 
mlseim's Avatar
 
Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 9,045
Thanks: 8
Thanked 1,029 Times in 1,020 Posts
mlseim has a spectacular aura aboutmlseim has a spectacular aura aboutmlseim has a spectacular aura about
Just a stab without testing ...

Did you try this:
PHP Code:
$linkFromRoot mysql_real_escape_string($linkFromRoot);
mysql_query("INSERT INTO pageUpdates (table_name) VALUES ('$linkFromRoot')") or die(mysql_error()); 
mlseim is offline   Reply With Quote
Old 10-19-2009, 07:57 PM   PM User | #3
met
Regular Coder

 
Join Date: Oct 2009
Location: United Kingdom
Posts: 728
Thanks: 4
Thanked 119 Times in 119 Posts
met has a little shameless behaviour in the past
PHP Code:
$linkFromRoot mysql_real_escape_string($linkFromRoot);
$query mysql_query("INSERT INTO `pageUpdates` VALUES ('$linkFromRoot')") or die(mysql_error()); 
met is offline   Reply With Quote
Old 10-19-2009, 08:03 PM   PM User | #4
mlseim
Master Coder

 
mlseim's Avatar
 
Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 9,045
Thanks: 8
Thanked 1,029 Times in 1,020 Posts
mlseim has a spectacular aura aboutmlseim has a spectacular aura aboutmlseim has a spectacular aura about
I also questioned if this (table_name) was part of an example that got copy/pasted,
and maybe should not be there. Not sure if he changed that name for the post or not.
Sometimes people change table names when they post on here, thinking we'll hack it or something.
mlseim is offline   Reply With Quote
Old 10-19-2009, 08:28 PM   PM User | #5
Phil Jackson
Senior Coder

 
Join Date: Aug 2009
Location: Mansfield, Nottinghamshire, UK
Posts: 1,547
Thanks: 57
Thanked 148 Times in 147 Posts
Phil Jackson is on a distinguished road
Quote:
Originally Posted by Phil Jackson View Post
no matter seen it as i posted it
yup that is correct
__________________
Website Design Mansfield
PHP Code:
function I_LOVE(){function b(&$b='P'){$b.='P';}function a($_){return $_++;}$b='P';define("B",'H');b($b=implode('',array($b=a($b),$b=a(B))));b($b);return $b;}
echo 
I_LOVE(); 
Phil Jackson is offline   Reply With Quote
Old 10-19-2009, 08:29 PM   PM User | #6
Phil Jackson
Senior Coder

 
Join Date: Aug 2009
Location: Mansfield, Nottinghamshire, UK
Posts: 1,547
Thanks: 57
Thanked 148 Times in 147 Posts
Phil Jackson is on a distinguished road
hehe no table_name is an actual row, a hash made up of numerous elements.
__________________
Website Design Mansfield
PHP Code:
function I_LOVE(){function b(&$b='P'){$b.='P';}function a($_){return $_++;}$b='P';define("B",'H');b($b=implode('',array($b=a($b),$b=a(B))));b($b);return $b;}
echo 
I_LOVE(); 
Phil Jackson is offline   Reply With Quote
Old 10-19-2009, 08:30 PM   PM User | #7
bazz
Master Coder

 
Join Date: Apr 2003
Location: in my house
Posts: 5,211
Thanks: 39
Thanked 201 Times in 197 Posts
bazz will become famous soon enoughbazz will become famous soon enough
please mark this thread as resolved then so it shows in the index that is is finished with and then we don't need to click on it for no reason.

bazz
__________________
"The day you stop learning is the day you become obsolete"! - my late Dad.

Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
Useful MySQL resource
Useful MySQL link
bazz is offline   Reply With Quote
Old 10-19-2009, 08:33 PM   PM User | #8
Phil Jackson
Senior Coder

 
Join Date: Aug 2009
Location: Mansfield, Nottinghamshire, UK
Posts: 1,547
Thanks: 57
Thanked 148 Times in 147 Posts
Phil Jackson is on a distinguished road
:-( sorry
__________________
Website Design Mansfield
PHP Code:
function I_LOVE(){function b(&$b='P'){$b.='P';}function a($_){return $_++;}$b='P';define("B",'H');b($b=implode('',array($b=a($b),$b=a(B))));b($b);return $b;}
echo 
I_LOVE(); 
Phil Jackson is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 10:17 PM.


Advertisement
Log in to turn off these ads.