MySqlTalk.com  

Go Back   MySqlTalk.com > Programming Languages and MySQL > PHP
User Name
Password
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread
Old 11-11-2004, 10:15 PM   #1
DataSpy
Junior Member
 
Join Date: Nov 2004
Posts: 2 DataSpy is on a distinguished road
Help with inserting data into database

I'm trying to do something like this
PHP Code:
$query="INSERT INTO ".$table_name." ('catagory', 'link', 'link_description', 'link_title', 'link_name',) 
VALUES ('', '"
.$link."', '', '', '') WHERE catagory=".$catagory.""
I know this isn't right, I just don't know how to do what I want. Any help would be greatly appretiated!
DataSpy is offline   Fork this post Reply With Quote
Old 11-19-2004, 07:43 PM   #2
freeware
Junior Member
 
Join Date: Nov 2004
Posts: 3 freeware is on a distinguished road
Re: Help with inserting data into database

Looks like some syntax errors. I assume the general logic is correct.
Try this
$query="INSERT INTO ".$table_name." ('catagory', 'link', 'link_description', 'link_title', 'link_name')
VALUES ('', '".$link."', '', '', '') WHERE catagory=".$catagory;

freeware
freeware is offline   Fork this post Reply With Quote
Reply


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

Advanced Search

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Corruption using navicat webie Navicat Support 1 08-19-2005 02:12 PM
Problems Entering Data from terminal to Mysql? fvs General 2 10-01-2004 07:02 PM
Import Access, Excel and data of other formats to MySQL by Navicat NavicatGuy Articles 0 08-17-2004 01:08 AM
3.3 Creating and Using a Database Administrator Documentation 13 06-09-2004 04:56 PM
1.2 Overview of the MySQL Database Management System Administrator Documentation 0 06-07-2004 10:11 PM



All times are GMT -4. The time now is 05:59 AM.



Powered by: vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
Google
  Web http://www.mysqltalk.com
DISCLAIMERS:
1. We have no commercial interest in this site.
Banner Ads and Subscriptions will only be used to help pay for hosting and maintenance costs.
2. MySQLTalk.com is NOT affiliated with MySQL AB in any way.
3. MySQLTalk.com is NOT endorsed by MySQL AB in any way.
4. Please do not post any content that is harmful to MySQL or MySQL AB, meaning no misleading or obsolete information will be tolerated.
Well-founded constructive criticism meant to help the community is permitted.
5. This website is founded with the goal of improving the MySQL community.
We not only tolerate newbies, we encourage them.
Please do not ask newbies to "read the manual".