473,674 Members | 3,376 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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($de lSQL,$connectio nID)
or die ("Query failed");
}
Jul 16 '05 #1
2 1736
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
8778
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 SQL statements, mysql_query() returns TRUE on success and FALSE on error. A non-FALSE return value means that the query was legal and could be executed by the server. It does not indicate anything about the number of rows affected or returned. It...
6
4662
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 ($DB_name, $chan); $resultid = mysql_query ("select name_ru, description_ru, retail, dealer from lasershot WHERE le='1'", $chan); ........ ======================================================
7
3917
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 what I have now: mysql_query("UPDATE about SET category_id = 58 WHERE about_id = 5") or die('error: ' . mysql_error());
5
3482
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 the programm, the bash said segmentation fault malloc_consolitat error. I have mysql version 4.15
0
1142
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” and so result of this: “You could not be logged in” I don’t know why it’s happen, but by testing my query, I found out that problem in “user_password”, without this parameter everything is working smoothly. To be more precise, the query is not...
2
2253
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 use that same file in my code, using fread and reading the complete file, then use this "Other" version of mysql_query with the contents of the this file as the argument. Thanks Bruce
4
5144
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 likely localhost).
11
13206
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')", $link2); As far as understand the problem is that $link2 is "not a valid MySQL-
5
9127
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 $conn = @mysql_connect($db_server,$db_user,$db_pass) or die("Connection to Database Server Failed"); @mysql_select_db($db) or die("Database Selection Failed"); return $conn; }
0
8959
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8652
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8707
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7490
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6269
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
5737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4456
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2855
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
1854
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.