hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : PHP/MYsql Question
Reply

Forum Jump

PHP/MYsql Question

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 02-04-2003, 10:10 AM
saj saj is offline
Web Hosting Master
 
Join Date: Dec 2002
Location: UK
Posts: 836

PHP/MYsql Question


Hi all

Im just currently working on a database programme at the moment for my website

few things im unsure about maybe someoen could help?

- My database has the following fields

-product id, prod description,link,status,effective from,effective to, no of acesses

Right what im trying to do is acheive the following:

- In the link field say i put in the link of "http://www.google.com" now when i retrive this information on the webpage it does not come up as a clickable link.. How do i fix this problem?anything specific i have to do?

- on the right hand column i have something called "top 10" what this does is retrive and displays the top 10 clicked prodcuts..any idea on how to set this up?

Thanks
bye for now
s



Sponsored Links
  #2  
Old 02-04-2003, 10:17 AM
sylow sylow is offline
Junior Guru Wannabe
 
Join Date: May 2002
Location: Alkmaar, Netherlands
Posts: 78
1. goto hotscripts.com
2. download few php scripts that sounds same as you want to do
3. look at their code

good luck

__________________
Gokhan Arli
Web Developer(RubyOnRails/MySQL/.NET)
www.sylow.net

  #3  
Old 02-04-2003, 01:01 PM
CPR CPR is offline
Newbie
 
Join Date: Jan 2003
Posts: 24
erm

u need to set the address up as a link, it doesn't automatically detect it so:
<a href="$address">$address</a>

$address is whatever the variable is set up as, i presume u could do it like this anyway, am still only learning php.

i dunno bout other one, somehow make it so it shows the products which have been sold the most amount of times maybe using COUNT statement then somehow show the top 10 in order???

Sponsored Links
  #4  
Old 02-04-2003, 01:57 PM
NicoV NicoV is offline
WHT Addict
 
Join Date: Aug 2001
Posts: 145
use the following select statement:

select * from TABLENAME order by noofaccesses DESC limit 10

__________________
Nico V.
KazaaSkins.Com - Now online!

  #5  
Old 02-04-2003, 02:20 PM
phpLancer phpLancer is offline
Disabled
 
Join Date: Dec 2002
Posts: 2
Quote:
Originally posted by NicoV
use the following select statement:

select * from TABLENAME order by noofaccesses DESC limit 10
-- Editted --

  #6  
Old 02-05-2003, 08:54 AM
saj saj is offline
Web Hosting Master
 
Join Date: Dec 2002
Location: UK
Posts: 836
Hi

got the answer the link question:

<td><a href="<?php echo $row_Recordset1 ['link']; ?>" target="_blank">Link</a></font></td>


finalyl clocked it

with regards to the counter thingy

does the Field numberof access has to be set up in anyway on the table?

sajid

  #7  
Old 02-05-2003, 09:43 AM
Rich2k Rich2k is offline
Web Hosting Master
 
Join Date: May 2002
Location: UK
Posts: 2,994
No, you can have whatever fields you like in your table.

  #8  
Old 02-05-2003, 12:52 PM
saj saj is offline
Web Hosting Master
 
Join Date: Dec 2002
Location: UK
Posts: 836
Right thanks for that

what ive done is created a new Field called Counter and set its type to be BIGINT and its value is all set at 0

i have this Table called "product_title" which shows all the titles of the products i have e.g printer,scanner, and whatever else

When each Product link is clicked it takes u to the product page..on that page has its description and all that stuff on it

Basically each product has its own counters..what needs to be done possibly that each time a page is clicked..the counter is updated..

the product with most hits will appear in the top 10 most hits..

how do i start this do u need some sort of update query?

thanks
saj

  #9  
Old 02-06-2003, 01:26 PM
saj saj is offline
Web Hosting Master
 
Join Date: Dec 2002
Location: UK
Posts: 836
any takes on this?

thanks
s

Reply

Related posts from TheWhir.com
Title Type Date Posted
Tesora's OpenStack DBaaS Supports MongoDB, Cassandra, Redis, and MySQL Web Hosting News 2014-05-23 14:53:11
Google Releases Hosted Database Service Cloud SQL to General Availability Web Hosting News 2014-02-12 13:46:02
Google Cloud Provides Support For Native MySQL Connections Web Hosting News 2013-11-01 14:36:06
PHP And MySQL Scaling: Preparing A Startup For Growth Blog 2014-04-24 13:27:35
Joomla Hosting Study Shows Speed, Uptime Top Selling Points of a Web Host Web Hosting News 2012-11-07 15:06:36


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:
WHT Membership
WHT Membership



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?