Programming Theory
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesProgramming Theory

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old March 9th, 2004, 10:50 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
inserting records in multiple tables

well not much experienced with php/mysql..i have just started a project in which i have to maintain a members database ...the members fall in several categories and then those categories have further sub categories.. so i have got 3 tables using the table type MyIsam using version 4 mysql

1. Member
2. Category
3. Sub Category

now when inseting data through forms i have to insert it directly in 3 tables...i know how to insert it single table but how can i insert it in more then 1 in a single statement?

secondly help me out in deleting those records from multiple tables through a single statement

in the last how can implement a full text search in php ?


Thanks in Advance
Farhan Nawazish
webmaster@hrdn.net

Reply With Quote
  #2  
Old March 9th, 2004, 11:35 AM
System System is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Posts: 665 System User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Message Moved

Thread moved from 'PHP Coding' to 'Programming Theory' by CodeKadiya.

Reason:

Reply With Quote
  #3  
Old March 9th, 2004, 12:03 PM
honcho's Avatar
honcho honcho is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Cape Cod
Posts: 1,347 honcho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 2 sec
Reputation Power: 3
RE: inserting records in multiple tables

Quote:
now when inseting data through forms i have to insert it directly in 3 tables...i know how to insert it single table but how can i insert it in more then 1 in a single statement?


You can't. You must use three SQL statements to insert into three tables.

Quote:
secondly help me out in deleting those records from multiple tables through a single statement


Again, you can't. DELETE only works on one table at a time.

Quote:
in the last how can implement a full text search in php ?


This is probably easier done in MySQL. See this page.

Reply With Quote
  #4  
Old March 9th, 2004, 04:39 PM
brut brut is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 367 brut User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 30 sec
Reputation Power: 2
RE: inserting records in multiple tables

Actually you can delete from multiple tables at one time. If you use InnoDB table w/foreign key constraints, you can also do cascading updates/deletes.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesProgramming Theory > inserting records in multiple tables


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway