Solved

php mysql query extend to perform two actions

Posted on 2011-09-30
3
226 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 110

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to count occurrences of each item in an array.
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.

623 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