473,405 Members | 2,294 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

mysql_query function

Hi ng,
can anybody helps me with this
function ? it does not work ...
i have the connectionID and what does not work is the :

$delSQL = "DELETE FROM data WHERE abmonat < '$month' AND abtag < '$day'";

what is wrong with the $delSQL - Function ?

Here is the function :
....

function delete_old ()
{
$day = date("d");
$month = date("m");
$connectionID = OpenDatabase ();
$delSQL = "DELETE FROM data WHERE abmonat < '$month' AND abtag < '$day'";
$result = mysql_query($delSQL,$connectionID)
or die ("Query failed");
}
Jul 16 '05 #1
2 1700
haref wrote:
can anybody helps me with this
function ? it does not work ...


Before I even try to test the code: can you specify "does not work"?
Does it output an error? What error? Or does it just not do what you want?

Jochen

--
/**
* @author Jochen Buennagel <zang at buennagel dot com>
*/

Jul 16 '05 #2
Jochen Buennagel <za**@buennagel.com> wrote in message news:<bi*************@news.t-online.com>...
haref wrote:
can anybody helps me with this
function ? it does not work ...


Before I even try to test the code: can you specify "does not work"?
Does it output an error? What error? Or does it just not do what you want?

Jochen


Hi Jochen,

It does not do what I want it to do.
It should delete all datasets, which are
not aktual anymore.
(Thats why the "d" and "m" Function)
Thanks for answer.

Regards

Andy
Jul 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: lkrubner | last post by:
www.php.net says: >>>>>>>>>>>> Only for SELECT,SHOW,EXPLAIN or DESCRIBE statements mysql_query() returns a resource identifier or FALSE if the query was not executed correctly. For other type of...
6
by: aa | last post by:
I use the following fragment of code to output datf from MySQL: ====================================================== $chan = mysql_connect ($db_host, $username, $password); mysql_select_db...
7
by: John Moore | last post by:
Hi I posted three days ago about a function I wrote which kept refusing to run a mysql_query. Well I did away with the function, and hard coded the variables into the query itself. Here's...
5
by: Gabriel | last post by:
Hi, I have a problem with the c-api function mysql_query. When I try to send these query "SELECT a FROM b" the function mysql_query hang's up and the program stops at the codeline. If I kill...
0
by: FB2006 TEAM | last post by:
Apache 2.0 PHP 4.4 MySQL 5.0 ========= Ok, here what is going on! Every time when I trying to login into system I’m getting message (its last “else” in F_LogIn function): “Nothing is working”...
2
by: Bruce A. Julseth | last post by:
Is there a multi-query version of mysql_query? I have my sql in a text file and it works great from the command line (mysql -u me -p <my.sql). my.sql had multiple lines of sql. I would now like to...
4
by: atyndall | last post by:
OK, this is the relevant portion script: <?php $username = '__'; // MySQL Database Username. $password = '__'; // MySQL Database Password. $server = '__'; // MySQL Database server (most...
11
by: Kurda Yon | last post by:
Hi, I got this warning: mysql_query(): 4 is not a valid MySQL-Link resource. The line which cause this warning is: mysql_query("insert into $tablename (id,priority) values('$id', '0.00')",...
5
by: lisles | last post by:
i have a page funtion.php which hs the function to connect to the db /* Mysql Connection */ function connect(){ global $db_server,$db_user,$db_pass,$db;//Global Values from the config.php...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.