Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Aug 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow How Do I Create A Link That Runs A MySql Query When Pressed!!

    I Want To Create A Link, And When You Press That Link It Runs A MySql Query
    Can Someone Post The code Here, Thanks!!

  • #2
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,046
    Thanks
    19
    Thanked 42 Times in 42 Posts
    no body is goin to do it for you, if you have code post it and people will help you get it working, otherwise pay someone.

  • #3
    Regular Coder
    Join Date
    Jan 2005
    Posts
    153
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That is too broad of a request.
    First, if you want it to run the query without a new page loading, you'll need some AJAX integrated. If you don't mind a new page loading, then it's simple PHP/MySQL. But we need to know WHAT you're wanting to do also.

    If you have any code that you've already got made could you please post it here so we can look at it and see what we can do? If not, I suggest finding someone who you can pay to do what you want.

  • #4
    Senior Coder Len Whistler's Avatar
    Join Date
    Jul 2002
    Location
    Vancouver, BC Canada
    Posts
    1,323
    Thanks
    26
    Thanked 100 Times in 100 Posts
    Quote Originally Posted by -CrAzY- View Post
    I Want To Create A Link, And When You Press That Link It Runs A MySql Query
    Can Someone Post The code Here, Thanks!!
    Here is two I use, but you are better off getting a PHP/MySQL book because a MySQL database query is PHP/MySQL 101.

    PHP Code:
    $total_results mysql_result(mysql_query("SELECT COUNT(*) as Num FROM images"),0); 
    PHP Code:
    $result mysql_query("SELECT * FROM images WHERE image_id = '$image_id'"); 
    Leonard Whistler


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •