Solved

php mysql query extend to perform two actions

Posted on 2011-09-30
3
217 Views
Last Modified: 2012-05-12
I have the following snippet of php code.  I need to truncate two tables...how do I format the $query1 line to do this?

   
 $query1 = "TRUNCATE TABLE ALIASES";
    $result = mysql_query($query1);

    if ($result) 
       echo "ALIASES Table Reset
		 
	";
    else 
       echo "There was a problem resetting ALIASES
		 
	";

Open in new window

0
Comment
Question by:pda4me
3 Comments
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 36895220
Use two TRUNCATE queries.  Run them separately.  
0
 
LVL 13

Expert Comment

by:Hugh McCurdy
ID: 36895291
I agree with Ray.
0
 

Author Closing Comment

by:pda4me
ID: 36895354
Thanks Ray!
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now