Unstoppable Domains

Can anyone see anything wrong with this?

Spacemail by SpaceshipSpacemail by Spaceship
Watch

PoorDoggie

Soon to be RICHdoggie!VIP Member
Impact
18
Sorry to keep troubling everyone, but I would be grateful if you could help me with this:

Code:
INSERT INTO pd_shops ('id' , 'name' , 'description' , 'keywords' , 'url' , 'category' , 'image' , 'tall_banner' , 'long_banner' , 'hit_count') VALUES ('' , '$name' , '$description' , '$keywords' , '$url' , '$category' , '$image' , '$tallbanner' , '$longbanner' , '0')

That mysql code comes up with the 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 ''id' , 'name' , 'description' , 'keywords' , 'url' , 'category'

Can anyone see anything wrong with it? I can't, but then again, I am thick! :lol:

Thanks
Tom
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Is that the actual query that is getting sent?

Try this:

In your script, right under the line where you build the SQL statement to be parsed, but before the mysql_query() call, print or echo your query statement out so you can see exactly what is being parsed by mysql_query(). i.e:

PHP:
$query = "insert into yada yada yada";
echo $query;
mysql_query($query);



Also, check that ID isn't an autonumber field. I'm not 100% sure on this, but if it's autonumber, you shouldn't insert anything into it, and it may be choking on that.

Mike
 
0
•••
i dont see a reason to have the first data if yo ualready have the table and database created... try it w/o that.

it might also be the ID autoincrement thing, but i think u shud have the empty entry there.
 
0
•••
PHP:
mysql_query("INSERT INTO pd_shops ('name' , 'description' , 'keywords' , 'url' , 'category' , 'image' , 'tall_banner' , 'long_banner' , 'hit_count') 
VALUES ('$name' , '$description' , '$keywords' , '$url' , '$category' , '$image' , '$tallbanner' , '$longbanner' , '0')") or die(mysql_error());

That should fix it. Let me know if you have any further problems.
 
0
•••
nasaboy007 said:
it might also be the ID autoincrement thing, but i think u shud have the empty entry there.
with the id thing... on the phpmyadmin page it says "(id) VALUES ('')" in there, so I just copied that. If $image, $tallbanner and $longbanner are empty then the query works, but the variables are just urls to images, and not anything too iffy, and should, in theory work. I will try and get the mysql query printed for you (and me) to see, but I can't at the moment.

Axillant, did you do anything apart from put it in a mysql query? That is what I do already, but I just didn't bother putting it up here. Thanks though :)

Thanks
Tom
 
0
•••
Did you try just doing something like this:

PHP:
INSERT INTO pd_shops VALUES ('' , '$name' , '$description' , '$keywords' , '$url' , '$category' , '$image' , '$tallbanner' , '$longbanner' , '0')

And removing ('id' , 'name' , 'description' , 'keywords' , 'url' , 'category' , 'image' , 'tall_banner' , 'long_banner' , 'hit_count') all together?
 
0
•••
gamex said:
Did you try just doing something like this:

PHP:
INSERT INTO pd_shops VALUES ('' , '$name' , '$description' , '$keywords' , '$url' , '$category' , '$image' , '$tallbanner' , '$longbanner' , '0')

And removing ('id' , 'name' , 'description' , 'keywords' , 'url' , 'category' , 'image' , 'tall_banner' , 'long_banner' , 'hit_count') all together?
That might work acctually! :) Thanks will try it.

Here is the full mysql query btw:

Code:
INSERT INTO pd_shops ('id' , 'name' , 'description' , 'keywords' , 'url' , 'category' , 'image' , 'tall_banner' , 'long_banner' , 'hit_count') VALUES ('' , 'Photo Albums, CD albums, DVD albums - Arrowfile protects, organises and presents your memories' , 'We offer you a loose-leaf binder system that allows you to break away from the limitations of other albums or collating methods. Organise every size photograph, slide, negative or collectable in a single album. Arrowfile sleeve pages are archival quality to protect your precious images for years to come.' , 'album, albums, photo album, picture album, organiser, organizer, leather photo album, anniversary, anniversary gifts, aps photo albums storage, archival library supplies, archival photo albums, autographs, photography, camera, cameras, classical music, coin collecting, collectables, collectibles, collecting, collections, family photo albums, family photographs, family photos, family pics, family pictures, holiday photos, holiday pics, holiday pictures, holidays, image, images, music cd, old coins, organising, photographer, photographers, photographs, photography, photography archival supplies, photos, pic, pics, picture, picture frames, pictures, professional photo albums, quality photo albums, rare coins,scrapbook, scrapbook album, self storage, stamp collecting, stamps, stock photography, stock photos, storage, wedding photo albums, wedding photography, wedding pictures' , 'http://scripts.affiliatefuture.com/AFClick.asp?affiliateID=17989&merchantID=1111&programmeID=3229&mediaID=0&tracking=&url=' , '6' , 'http://banners.affiliatefuture.com/1111/17054.gif' , 'http://banners.affiliatefuture.com/1111/17056.gif' , 'http://banners.affiliatefuture.com/1111/17058.gif' , '0')
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer
Appraise.net

We're social

Domain Recover
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back