473,490 Members | 2,472 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to write a query for ads

1 New Member
HI,

I want to write a query for displaying ads.Ads may be many but all advertisements should not be displayed on the web page.only according to the date that particular ad should appear on the web page.please guide me in writing the query for my above doubt.please help me out.Hope i'll get my answer soon.
Thanking you,
Feb 26 '08 #1
2 1102
debasisdas
8,127 Recognized Expert Expert
So far my knowledge is concerned to display images in web pages something like add rotator is used . and some XML file is passed as the argument file to dynamically change the add file path and frequency.

SO what you can do is retrieve the file path from database and store in XML file and use that file for dynamically changing the ads.
Feb 26 '08 #2
AramAz
9 New Member
HI,

I want to write a query for displaying ads.Ads may be many but all advertisements should not be displayed on the web page.only according to the date that particular ad should appear on the web page.please guide me in writing the query for my above doubt.please help me out.Hope i'll get my answer soon.
Thanking you,
ok, Let's suppose your database contains this table:
Table : ad (advertiserID,advertiserBanner,startingDate,finish ingDate)

One way is to list all the ads that contain today's date (if you're changing the advertisement every 24 hours) and then show the resulted records accordingly.

An example query would be:
Expand|Select|Wrap|Line Numbers
  1. select * from ad 
  2. where curdate() between startingDate and finishingDate
  3.  
The function curdate() returns the current Date. This is mysql function.

Regards,
Aram Azhari
Mar 2 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3035
by: lawrence | last post by:
I've been bad about documentation so far but I'm going to try to be better. I've mostly worked alone so I'm the only one, so far, who's suffered from my bad habits. But I'd like other programmers...
0
3788
by: Tanamon | last post by:
Hello All, I am a MySQL newbie trying to write a query that selects file_name records possessing the highest numbered version for that unique file_name. I show sample data and two trial queries...
7
8977
by: Scott | last post by:
I need help to modify the code below to pass url variables from a framset. The click to run this will be in the mainFrame. This script works well in a non-frame page. Grabs the current url...
2
1419
by: laredotornado | last post by:
Hello, Using PHP 4 and MySQL 4, how would I write a function such that it takes a valid MySQL query, and a column on which to order the query, and return a new query ordered by that column? ...
3
2258
by: Jason Huang | last post by:
Hi, In my C# windows form project, I would like to have a function which will write the SQL query result into an XML file. Would someone tell me how to do this? Thanks for help. Jason
10
2797
by: sandraz444 | last post by:
I have an expression in the query under my form to autofill the date under a certain condition but it wont write to the underlying table?? The date shows in the form but not the table. Does anyone...
1
2432
by: lorirobn | last post by:
Hi, I have a query that I have been using as a record source for a form with no problems. I just created a new "addnew" form, and added 20 records to the table with this form. The problem I...
2
3415
by: Himmel | last post by:
Hello! The reference database I currently use runs queries that pull data from hundreds of tables in order to create user-friendly form view. The problem is that these queries can take upwards of...
1
977
by: manikandaprabhu | last post by:
hi all, i am manikandaprabhu. can you help me out in writing the query which should meet the standards and also must have less exection time.how to write a perfect query.And the procedures...
5
3621
by: Jon Skeet [C# MVP] | last post by:
On Sep 9, 9:41 am, raylopez99 <raylope...@yahoo.comwrote: It's tricky in .NET for two reasons: 1) LINQ doesn't have any concept of "remove" 2) List<T>.RemoveAll doesn't pass in the index...
0
6974
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
7146
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
7183
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...
1
6852
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
7356
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...
1
4878
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...
0
3084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3074
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1389
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 ...

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.