Results 1 to 7 of 7

Thread: how to visualize datda from mysql database using PHP

  1. #1
    Join Date
    Oct 2012

    how to visualize datda from mysql database using PHP


    i have stored data into database ,how can i visualize data from mysql database using PHP, would be grateful for your help

  2. #2
    Join Date
    Oct 2012
    What you mean by visualization ? Graphic charts or what ?

  3. #3
    Join Date
    Oct 2012
    thanks for your reply, i don't mean to charts, i mean , i have a database with several tables, for example, one table has several picture from different product, one table has several video link of the product, one table has the pdf link, i would like to know how can i show in the web page all the data from database by user clicking , for example , there is a button called "video" if one click on it then , it will show the video from database, another button called "pdf" if one click on "pdf" button then it will show the correcponding pdf file from database(as inside database alreda)

  4. #4
    Join Date
    Oct 2012
    I think it is not good idea to store pictures in database, better would be to store just a photo names. However, you have to do it similar to that:

    PHP Code:


    $query=mysql_query("SELECT `pic_link` FROM pic_table");
    '<img src="'.$row.'" />';


    $query=mysql_query("SELECT `vid_link` FROM vid_table");
    // and so on, depend of which button was submited 
    It is the simplest way to do that. If I will find more time I can show you how exactly do that.
    And do you want to have just links to video and pdf files or just straight show them on the page ?

  5. #5
    Join Date
    Oct 2012
    thank you so much, actually i need it for a course and i just informed it that i have to do that using PHP and JQuery , therefore i would like to ask you once again, could you please give me an idea, how to use Jquery in this case?

    again, i did a mistakes, actually i didn't save photos into database , i have stored link of image, link of pdf, and link of video(for example www.hbvhvb/jpg, www.hbvhvb/mp4, www.hbvhvb/pdf) and now i have to show them by clicking on button

    i think this time i have give you clear information about what i want to do, would be happy if you give me some suggestion like before (using JQuery and PHP)

  6. #6
    Join Date
    Oct 2012
    It is all depend of what result you want to get. For example you can get data from database by PHP and then show 10 results on the page and make a button like: show more, after click on that user will see all results. It could be better if you would use PHP aswell for that, but as you have to use jQuery than I think it is not a bad idea
    But in that case you will have change a little bit a PHP script in this place:
    PHP Code:
    '<img src="'.$row.'" />';

    I will let it for you to think how to do that. If you would have any trouble than ask, but it think you'll be fine with that

  7. #7
    Join Date
    Oct 2012
    thanks a lot for your support, actually i am very new in PHP . i tried by using your code but i am not succeed could you please give me a favor of you. for example , i have a database name= db_image; one table name=image; table has 3 colmn: id, name and path (id =1. name = picture. path = www.fvjfnjf.com)
    and the button name is: "pic"(which will be clicked to view the image)
    now could you please write to me the code according to my information, i will be so grateful to you, i am sorry for such a request and even i don't know is it polite or not but i need this help and i found you a nice and helpful person , would be grateful for your kind help

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.09819 seconds
  • Memory Usage 2,908KB
  • Queries Executed 15 (?)
More Information
Template Usage (33):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (7)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (72):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates