Jump to content

Search the Community

Showing results for tags 'MySQL'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

  1. i found this script online: http://stackoverflow.com/questions/8022353/how-to-populate-html-dropdown-list-with-values-from-database <?php $conn = new mysqli('localhost', 'username', 'password', 'database') or die ('Cannot connect to db'); $result = $conn->query("select id, name from table"); echo "<html>"; echo "<body>"; echo "<select name='id'>"; while ($row = $result->fetch_assoc()) { unset($id, $name); $id = $row['id']; $name = $row['name']; echo '<option valu
  2. I want to update more than one column in php using mysql. fr example: $sql="update table_name set where username='$user'; $sql="update table_name set where password='$pass'; how to concatenate this querie? could you tell anyone how to solve this? Thanks in advance
  3. Hello everyone Anyone can help me i want show mysql records on .html page so plz tell me how i done and 2nd i m creat a sms submit form for user using text area but when i creat view.php page for show sms then show sms in one line of all text from sms so how i can do plz help me
  4. hello everyone m New In Php anyone Can Help I Want Upload Mutltifile with form name 2nd name file 1 file 2 file 3 file 4 than i want save in mysql like this id name 2ndname file3 file 4
  5. Hi guys, I'm new in PHP. I cannot find tutorial about how to get all categories article is listed in together with article title, author printed on the article list. I have 4 tables in DB: articles = DB for articles detailse: id, title, user_id, post_date articles_categories = id, category_id categories = category_id, category_name users = user_id, user_name, user_mail I want to do this: Which script logic do you suggest? Any kind of help is welcomed.
  6. Unknown column 'col' in 'field list' Is the error message, i tried all kinds of backticks, and quotes but doesnt work So I was thinking, how can I check (in phpmyadmin or in the mysql console) whether a table has the columns that are needed?
  7. My script gives a sort of an errormessage. Actually i can see a part of the code at the output screen in the browser. Like wth the php parser you get a notice or fatal error, but in this case the script does not work. How can i avoid these problems in the future?
  8. The idea is to insert with the browser a multiple input field, a loop, into mysql database. Is the solution to first put this loop input variable in an array and after that create in this case multible tables? Or is an array not necessary?
  9. I have a script and a MYSQL query its supossed to create a new table $variable now I have $sql = "CREATE TABLE '$variabele' "; But it doesnt work. I think CREATE TABLE works for constants not for variables. Which query should I use?
  10. Here's a fully working login system. Where users can sign up and access a members page. Features Include: - Login & Sign Up Page - Members Page Only **NOTE: I have not added any security code, you'll need to add this by yourself...** Step 1: Creating a Login and Sign Up Form. This will be a simple login page where users can enter their username and password, then click the submit button to access the members page. "login.php" will be the script that will be executed when they login. This processes the user information entered to check the validity through a database of users
  11. Im, a beginner and i just wanna know how to save html table data to mysql database using php..please help..thank you
  12. One example of a multiple query, which runs fine in my server is: SELECT city, name FROM customers However, another way (though not a better way) of writing same has been running fine in a tutorial I saw, but is not running in my case: SELECT city FROM customers; SELECT name FROM customers; I would appreciate any thought on why it runs for that person and not for me, noting that there was no typos in my queries, which I attempted many times. MySQL Server version: 5.6.16, Xampp 1.8.33 for windows.
  13. I want to update users when they purchase premium by their email OR database ID, either one would work, BUT the only way it's working for me at the moment is by me entering their ID in the $_SESSION at the top. I want the page to get the users ID OR email after they purchase. I have asked this many places and have got no answer, people basically tell me to just type it. That would be crazy to do that for every single user. If you have an answer, PLEASE! I literally beg for you to copy the code above and place stuff where it needs to be, I've been stuck for days/weeks. I've tried EVERYTHING
  14. hello so i created a registration page in html and a php code to connect to a database and enter the information to the database that all works. Now i want to ask if the user wants to log in would they need a separate php code to have a sort of certification that the account is valid? i made a html page for login but i need it to look back to the database to see if the user is registered so they can log in, not just anyone can log in...any ideas? or advice where i can find information about this? i see a lot of tutorials for making a log in page, making a registration page but how about when s
  15. Cat and sub category Table (cat_tbl) : id | cat_n | parent_id1 | cat | 02 | dog | 03 | tiger | 24 | lion | 05 | abc | 06 | bcd | 3 Now i have a product table as below (prod_tbl) : id | pwght | cid | cpid10 | 1.2 | 1 | 011 | 2.4 | 2 | 012 | 3.4 | 2 | 013 | 4.5 | 6 | 3 and user final weight product table is below (userprod_tbl) id | pwght | cid | cpid | prod_id ( is above prod_tbl primary id )1 | 1.1 | 1 | 0 | 102 | 2.3 | 2 | 0 | 113 | 3.1 | 3 | 2 | 124 | 4.0 | 6 | 3 | 13 **RESULT : ( OUTPUT WHICH I WANT ) IS comparison of p
  16. Hi everybody!Im newbie to php. please,suppose we have a MYSQL DATABASE with table CUSTOMERS.In the page: addCustomer.php, we echoed this table and it returned us a number of rows.on the same page, we have a form that contains empty fields. (name, birth, adress).Questions:How to add a button front of each displayed row? and how to when we click on the related button we fill the content of the form and submit it to the table CUSTOMERS. we want to verify if the customer exists when echoing...if so we click on the relative row, and the form is filled. if no we fill the form manually thanks
  17. I love what w3schools is doing with the SQL tutorial - good stuff. I noticed that one of the most fundamental elements of w3schools (the "Try it now" button) goes missing about half-way through the SQL Tutorial. May I ask why? I teach sql at a local community colleg. I have gone through several textbooks with mixed results, and I am always keeping my eyes open for new ways to teach. I would love to incorporate w3schools SQL tutorial into my class; do you have a db dump available for download of the tables you use? One of my lessons will be having students figuring out how to get the data
  18. I need to upload my images to a folder and need the image name with file type to be places in a mysql database so it can be accessed by another page. This is my php where everything works except uploading the image name to the database; Instaead the column is populated with the word array. Does anyone know how to fix this. MySql column is set to varchar(50). <?php require_once("connect.php"); $name = $_POST['job_name']; $img = $_FILES['job_timg']; $desc = $_POST['job_desc']; $plug = "INSERT INTO tbl_job VALUES (NULL,'".$name."','".$desc."', '".$img."')"; $Set =
  19. RaRa3

    registration php

    hello so i am making a registration page using html and php, i need to make the information send to mysql that i made with table but i never made select statements..i am not sure on how to make it i need help i am new to this so please bare with me. So I this code to connect to mysql none I am not sure how to fix it i know there must be a problem with the code for the submit line and with the isset. I got them from another user but made minor changes to fit my database. My database has 2 tables one named UserAccount with the information listed in the registration page and then another table n
  20. Cat and sub category Table (cat_tbl) : id| cat_n | parent_id1 | cat | 02 | dog | 03 | tiger | 24 | lion | 05 | abc | 06 | bcd | 3 Now i have a product table as below (prod_tbl) : id | pwght | cid | cpid10 | 1.2 | 1 | 011 | 2.4 | 2 | 012 | 3.4 | 2 | 013 | 4.5 | 6 | 3 and user final weight product table is below (userprod_tbl) id | pwght | cid | cpid | prod_id ( is above prod_tbl primary id )1 | 1.1 | 1 | 0 | 102 | 2.3 | 2 | 0 | 113 | 3.1 | 3 | 2 | 124 | 4.0 | 6 | 3 | 13 **RESULT : ( OUTPUT WHICH I WANT ) IS comparison of pr
  21. I have a mySQL posts table, a files table, and a relationships table. I need to sum file download counts grouped by the post the files are associated with. SELECTp.id, p.post_title, count(d.download_id) FROM posts p INNER JOIN file_log d ON p.id = d.file_idgroup by p.post_title The above query works as long as the titles of the files are the same, which is not always the case. I really need to group them by their relationship to the post they are associated with. The relationships are stored in relationships r, which shows r.post_id (which is p.id from posts), and r.file_id (wh
  22. producttable : id | mid | pid | owgh | nwgh | 1 3 12 1.5 0.6 2 3 12 1.5 0.3 3 3 14 0.6 0.4 4 3 15 1.2 1.1 5 4 16 1.5 1.0 6 4 17 2.4 1.2 7 3 19 3.0 1.4 8 3 19 3.0 1.2 I need result in while loop as **below** : as per mysql query $sql = "SELECT pid,owgh,nwgh from produttable WHERE mid = 3 "; **RESULT I WANT AS BELOW :** Product Id | Old weight | New weight --------------------------------------- 12 1.5 0.6
  23. producttable : id | mid | pid | owgh | nwgh | 1 3 12 1.5 0.6 2 3 12 1.5 0.3 3 3 14 0.6 0.4 4 3 15 1.2 1.1 5 4 16 1.5 1.0 6 4 17 2.4 1.2 7 3 19 3.0 1.4 8 3 19 3.0 1.2 I need result in while loop as **below** : as per mysql query $sql = "SELECT pid,owgh,nwgh from produttable WHERE mid = 3 ";**RESULT I WANT AS BELOW :** Product Id | Old weight | New weight --------------------------------------- 12 1.5 0.6
  24. Hello again my friends I've had some problems again, I'm trying to select the last id, or the max(id) but it keeps returning resource id. <?php $getLastData = mysql_query("SELECT MAX(id) FROM `database`.`forumTopics` WHERE category='$outData->id'");$getInfo = mysql_fetch_object(mysql_query("SELECT * FROM `database`.`forumTopics` WHERE id='$getLastData'")) or die("Error: ".mysql_error());?> Hope anyone can help Thanks, Kris
×
×
  • Create New...