Jump to content

Search the Community

Showing results for tags 'mysql'.



More search options

  • 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

Found 263 results

  1. Net123

    how they do it

    hello anyone could please explain me how they doing this ?AUTOLOGIN URLhttp://wapzan.com/au...ODYzN2M3/229700 MAIN EDITORhttp://wapzan.com/ed...k3M/root/395384 i having a doubt for a long time how they doing up this "how they ordering codes one by one "?i know they used mysql for order these kinds but what is their basic program for order one by onelike if there was in (Main EDITOR)1st code2nd code3rd code4th code if i tried a insert some codes before 2nd they moving all the things to afterwards ....they doing this again and again really what was happening inside how they marking this orders ???
  2. BigD

    records in DB can not be updated

    I used a select statement and found a record in DB, When I tried to update the record, returned 0 rows and not updated. Here is the code. Please help.$query="SELECT classtype,startdate,enddate,classstatus from class where classname = '$classnameval'"; $result = mysql_query($query); echo "select class sql $query</br>"; $num_rows = mysql_num_rows($result); if (!$num_rows) { echo nl2br("Class $classname not in DB\n"); goto bye; } if ($result) { $row = mysql_fetch_array($result, MYSQL_ASSOC); $classtypeo = $row['classtype']; $classstatuso = $row['classstatus']; $sdateo = $row['startdate']; $edateo = $row['enddate']; echo "<h2>Class '$classname' found</h2>\n";var_dump($classstatuso,$sdateo,$edateo,$classtypeo); } else { echo "<h2>Sorry, unable to change class $classname </h2>\n"; goto bye; }var_dump($classstatusval,$sdate,$edate,$classtype); if ($classstatusval == '') $classstatusval = $classstatuso; if ($classtype == '') $classtype = $classtypeo; if ($edate == '') $edate = $edateo; if ($sdate == '') $sdate = $sdateo; $query="UPDATE class SET classstatus = '$classstatusval', startdate = '$sdate', enddate = '$edate', classtype = '$classtype', where classname = '$classnameval'"; $result = mysql_query($query); echo "update class sql $query</br>"; $num_rows = mysql_num_rows($result); if (!$num_rows)// if (!$mysql_num_rows($result)) { echo nl2br("Class $classname not in DB\n"); goto bye; }
  3. salman.pirani

    asp with MYSQL

    how can i connect asp with mysqlfor example if i want to send first name and last name into the columns of mysql so what will be the code . thanks
  4. BigD

    SQL error

    In the following code why gdate has the value of 12-08-13? could that cause sql error? or could the picture field(which is a thumb nail picture) cause the error?I have used the date("y-m-d") before and I was getting 2012-08-12. $gdate = date("y-m-d"); echo "gdate is $gdate"; $query = "INSERT INTO graduate(fname, lname, phone, email, picture, startdate, ". "gdate, gender, stdid, classid, intid) values('$fname', '$lname', '$phone', '$email', ". "'$picture', '$startdate', '$gdate', '$gender', '$stdid', '$classid', '$intid')"; echo "insert grad SQL is $query"; $result = mysql_query($query); if ($result) { echo "<h2>Student $fname $lname graduated</h2>\n"; } else { echo "<h2>SQL error</h2>\n". mysql_error(); }
  5. Matthias

    Mysql dump and import problem

    Hey guys, I've been learning to build websites through w3schools and I've come to my first problem. I am trying to transfer across my sql database to another computer. I believe I have performed the sql dump successfully as I have a small sql file in my bin directory. But when I saved it to disk and inserted into the bin directory on the other computer it doesn't seem to be found. Could someone please confirm that this is the correct syntax to be used: "mysql dump -u [user] -p [password] [db name] < [db name.sql]". Note; i do not use the brackets in the actual syntax. Also does the version of mysql have to be exactly the same for the import to work?
  6. BigD

    how to retrieve db keys?

    I just inserted a row into my db, how do I retrieve the row key?Here is the code: $query = "INSERT INTO student (graduatedate,lastname,firstname, gender,classid,address, city, state, zip, phone, altphone, email,ssn, dob, picture, lboxname, lbdeposit) " . " VALUES ('na','$lastname', '$firstname', '$gender','$classid','$address', '$city', '$state', '$zip', '$phone', '$altphone','$email','$ssn', '$dob', '$thumbnail','$lboxname', '$lbdeposit')"; $result = mysql_query($query);echo "<h2> Here is the result on student db= $stdid, $lastname ,$firstname,$gender,$classid,$address,$city,$state, $zip,$phone,$altphone,$email,$ssn,$dob,$lboxname,$lbdeposit</h2>\n"; if ($result) { echo "<h2>Student added</h2>\n"; $query = "SELECT $stdid, $classid from student where lastname= '$lastname' and firstname= '$firstname'"; } else { echo "<h2>Problem adding Student</h2>\n". mysql_error(); exit; } Here is the inquire result: Here is the result on student db= , aa ,aa,,2,,,, ,,,,,,, Student added$stdid is the key, it is not returned.
  7. sunziun

    Select Description Based on Name

    Hello everyone, I've a table which looks like this: id | name | description1 | some name | some descriptions. Now, I want based on the name to be able to select the description from the database. Would that be possible? Thanks for your time.
  8. ckrudelux

    Project Blog

    IntroductionSo I finally decide to have a go with this idea of having a project blog I'm really bad at this sort of thing and often find my self working for hours not writing a single line of comment to my code.. I don't find it necessary cause my naming often tells what it does so I don't see the point typing out the same thing the name says. But maybe I just lake the guide lines of typing comments.. read once that if you have to think twice about what a code you written does you need a comment for it. I will be doing a MVC pattern system. I've already started with this project so the first post will be covering what I've done so far. I encourage to comment any spelling or miss use of words since English isn't my main language and it would be good to get some improvements.To be clear the questions I have in my post are meant for me and I don't expect on you answering them for me. So who am I? Well I'm Andreas, I've been a member since 2008 I know I'm not the most active user I usually ask questions to small thing I don't now how to search for or then I just got completely stuck at some code error. Lets get started.So to get things in motion I'm using a class I call a Mapper class and it's task is to register paths to a controller and method. I get the path from the global $_SERVER['PATH_INFO'] variable which takes everything after "index.php" so "index.php/blog/posts/entry" would be "/blog/posts/entry". I had no intention of having any SQL queries into this class but I soon realized that I had to have a "registerMap" method to the class so I could set paths from a controller or model classes.Only problem with using this mapper method is that I can't do pages like "blog/posts/entry/page/2" in the path so they are set as normal get keys. From the index file I define paths to various places including a web root which defines the index file location compared to the server root. This is good in case you want to put this code into a sub folder. The template engine i choose to use is Smarty, you can find it at http://smarty.net, I just find it easy to use. My abstract Controller class extends the Smarty class so I can set the data form the Controller class. I added a function to tell what template folder I want to use in my view directory.Another neat thing I did was to make a plugin for Smarty what inserts the CSS files to the head so I get less request to the server. I will change that later to handle JavaScript files too. I also have a ActiveUser class that handles the current user on the site. I like this class a lot cause of the way I use sessions with it. Since we aren't allowed to throw cookies at our visitor without any permission this class only starts the session if the session cookie is set and the cookie is only set then you login on the page. I mostly like this cause I've seen complains about just this problem then reading about that new law about cookies. I think that covers the basic introduction of that I've done without going into detail of the exact code looks like to the point there I'm now. The next step is to add an admin panel where I can add and remove users. And change settings to other component. Current issueSo this is about how I handle the users which isn't the active one like say I'm logged in and i want to change someone else user type. How should I get that object in the code.At the moment I can fetch users from the ActiveUser class but this feels wrong. Cause it's not within the task that is set for the ActiveUser class. So what I think the ActiveUser should handle is hold the current user id and type and have the responsibilities to create/update/remove users. (maybe change password and type for the current user but it feels like that should be in the User class)The User class extends the Person class and contains only one extra property which is the user type.Why I choose to not have the user name in the User class is cause I hashed the user name making it more time consuming if the database got out. I also written an abstract class for collections the idea is that the class could sett properties like limit the number of objects which would be returned or the sorting order of the query "ASC and DESC" (Maybe a random order would be a great thing to add). Problem with this Collection class is that it's not fully thought through. I've written some code that uses the concept but I find my self doing the same code over and over again mostly the only thing that is different is the query to the database unless the object has child objects to be loaded. I'm sure that I should get the users from a collection class i just don't know how to complete this collection class at the moment cause the case scenarios are too many. One example is that i can load a user from the user collection but since the user is a part of a person. The person data must be loaded to the object too. Question is should I add some sort of property in the person collection class to get the query for that specific table so I can add it to my object. Also what if the object I extends has child objects and how do get them, a public method for getting that particular property data set from that person. Well I think this will be all for this time.. hope this wasn't too confusing.
  9. Hi guys,I want to create a vb.net application with a login.I want that the login verify the username and password with a table witch contains all usernames and passwords of all members and if the login found a correspondence with the table, I want that the login connect the user at the application.In the next form, I want that the application show some 'informations' like Name, E-mail, ... for the user that is logged in.I have try a lot of code, but none was working correctly.What can I do for make this 'simple' application? Best regards,Francesco
  10. i checked the main site and it has been a whole heap of help so far. However im not sure how to accomplish a specific task and im now stuck on this. I have the following query: SELECT * FROM chjadb_vehicles WHERE v_make ='$make' AND v_year= '$year' The following statement works fine. However what i want is to add more query criterias such as body type, transmission and thing like that. How do i set something like that. I tried doing it like this: SELECT * FROM chjadb_vehicles WHERE v_make ='$make', v_year= '$year', v_transmission = '$trans' Doesn't work however any help would be appreciated!
  11. sonu

    PHP & MYSQL Help

    Hi Guys! I have 2 fields name & email in mysql database.I want to check if the record exists or not in the DB and if not then it would insert records in the database. Quick help really appreciated. Thanks!
  12. I am trying to set up a mysql/php login and register system but whenever i try it fails. I was wondering if someone could write code that can do this with the following things: Database name = DBNAMEDatabase tabel = DBTABLEHost name = EXAHOST.COMHost username = HOSTUSERHost password = HOST PASSWebsite name = WEBNAME.ORG If anymore things are needed please tell me, and if someone could make one that works i would REALLY appreciate it Thanks
  13. osamaboshi

    visitors counter in php? [closed]

    I want to count user who open the page , I want to insert in mysql table when user open the page and I want to insert or upadet when close the page by click [x] or press alt+F4 but not onunload or onbeforeunload , cause this also call when refresh I want to call this alert when close onlyI can use a code which insert when open and not insert when refresh , but I couldnt solve insert or update when close the pagehere is my code: <?session_start();if (!isset($_SESSION["visits"])) $_SESSION["visits"] = 0;if ($_SESSION["visits"] > 0){echo 'visit='.$_SESSION["visits"];echo "You hit the refresh button!";}else{ mysql_query( "INSERT INTO najd_visit( visit_userId, visit_staticId, visit_page, visit_enterTime)VALUES ('$userId', '$Sid', '$title', '$date') "); $_SESSION["visits"] = $_SESSION["visits"] + 1;echo 'visit='.$_SESSION["visits"];echo "This is my site";}?>
  14. damju87

    Combine: two tables

    1st code is the album. It works when by clicking on a album which will bring up this: //initialize some vars$albumID = '';$album = '';//$songAlbum = $albumName; //check what photo we are looking forif(isset($_GET['id'])){ $albumID = mysql_real_escape_string($_GET['id']); //get the photo $sql = mysql_query("SELECT * FROM albums WHERE albumID='$albumID' LIMIT 1"); while($row = mysql_fetch_array($sql)){ $albumName = $row['albumTitle']; $albumpic = $row['albumpic']; $performer = $row['performer']; $albumtype = $row['type']; $titletrack = $row['titletrack']; $genre = $row['genre']; $releasedate = $row['releasedate']; $distributor = $row['distributor']; $albumtest .= ' <div id="content"> <div id="name">' . $albumName . '</div> <div id="photo"> <img src="../images/albums/album_th/' . $albumpic . '.jpg" /> </div> <ul class="clearfix"> <li> <span class="title">Performer (s)</span> <span class="data">' . $performer . '</span> </li><li> <span class="title">Type</span> <span class="data">' . $albumtype . '</span> </li><li> <span class="title">Title Track</span> <span class="data">' . $titletrack . '</span> </li><li> <span class="title">Genre</span> <span class="data">' . $genre . '</span> </li><li> <span class="title">Release Date</span> <span class="data">' . $releasedate . '</span> </li><li> <span class="title">Distributor</span> <span class="data">' . $distributor . '</span> </li></ul> </div> '; }}else{ $albumtest = "There are no available albums at this time!";} Second is the songs. It finds all the tracks from the album and places them in order. // Get all the data from the "example" table$result = mysql_query("SELECT * FROM songs WHERE album='Agia 1st Album' ORDER BY tracknum")or die(mysql_error());echo "<ol>";// keeps getting the next row until there are no more to getwhile($row = mysql_fetch_array( $result )) {// Print out the contents of each row into a tableecho "<li>";echo $row['songTitle'];echo "</li>";}echo "</ol>"; My problem is combining them into one. I want when the album is selected, the page is displayed with album information and tracklist.
  15. I am using phpMyAdmin and currently having trouble trying to make a foreign key. table album - soloID -> table solo artist - id Already tried: Indexing soloID Different sites: youtube, stackoverflow...etc After searching, I have found nobody actually made a detailed tutorial on how to make a foreign key for somebody who already created tables. Hopefully, somebody can help me here.
  16. damju87

    Table name = variable

    At the top of my page, I have: <?php//connect to dbinclude "MyConnect.php";// $artist = $_GET['Mia'];?> Inside the "MyConnect" is: //get all of the photos$photoList = "";$artist = $_POST['artist'];$sql = mysql_query("SELECT * FROM $artist ORDER BY photoID DESC LIMIT 6");//check for photos$photoCount = mysql_num_rows($sql); if ($photoCount > 0){ while($row = mysql_fetch_array($sql)){ $photoID = $row["photoID"]; $photoName = $row["photoName"]; $photoList .= '<li class="thumb"> <a href="#"><img src="../images/mia/' . $photoName . '.jpg" alt="' . $photoName . '" width="100" height="100" /></a> </li>'; }}else{ $dynamicList = "There are no photos at this time!";} What I'm trying to do is, set $artist to equal Mia which will make FROM $artist into FROM Mia. I want to repeat this on more pages.
  17. flix_is_here22

    MSSQL to MYSQL

    hi,i have got a problem. i have database MSSQL and i want to migration to MYSQL.anysuggestion for me??because i want to build a Ecommerce site.btw anyone know the risk if we publish a database MSSQL using IP public??i think this is a second option if i can't migration to MYSQL. :Sad:
  18. ibrahimjan

    CONCAT sql

    Hi All, I got this sql connection to my table wb, it all seems to work fine in phpmyadmin, when testing sql, but when i want to us it, it comes up with: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING inC:\----------\test3.php on line 75 line 75 is the $query_wb $query_wb = "SELECT CONCAT( "[", GROUP_CONCAT( CONCAT("{weID:'",`weID`,"'"), CONCAT(",weName:'",`weName`,"'}") ) ,"]") AS json FROM wb;"; any Ideas how to make it work??
  19. damju87

    PHP Loops

    How do I set this kind of loop? First, it fills the cell with the data from the database. <table border="1"><tr><td>Row 1, cell 1</td></tr></table> Then, if there is more data added into the database. <table border="1"><tr><td>Row 1, cell 1</td><td>Row 1, cell 2</td></tr></table> Here's where I want the loop to start. I want it to repeat the process when the row has two cells by creating a new row.
  20. I see these: euckr_korean_ci euckr_bin but none of them are working.
  21. I'm trying to save a lot of time instead of editing the page everytime. Wouldn't it be easier to just change the information in the database, right? I've been searching for days on how to do it but having no luck. I will be very grateful for the help. Thank you. <table id="data"> <tr> <th scope="row">Occupation</th> <td>Singer</td> </tr> <tr> <th scope="row">Debut</th> <td>December 02, 2011</td> </tr> <tr> <th scope="row">Data of Birth</th> <td>February 13, 1990</td> </tr> <tr> <th scope="row">Record Label</th> <td>Ttakttaguri Entertainment</td> </tr> <tr> <th scope="row">Links</th> <td><a href="http://d2kr.com/hboard3/" target="_blank">Official</a>, <a href="http://blog.naver.com/agia0213">Naver Blog</a>, <a href="https://twitter.com/#!/agia0213">Twitter</a>, <a href="http://me2day.net/agia0213" target="_blank">Me2day</a></td> </tr></table>
  22. fikiwan

    how to make relation at mysql database

    hello , i has a problemo fo make a relation in database my sql , I use XAMP 1.7.7 , can anyone help me , the relation can work , if delete 1 data in database master then data in database relation also remove , ... thx for help
  23. Hey folks.I have scanned the net for days trying to find anyone else discussing this problem, with no luck.I felt certain that it must be a common problem, but maybe not. In a nutshell:1) insert a record into table Z from script A;2) count(*) on table Z says 1 record (correct);3) link to script B via form submit, method post;4) insert a record into table Z from script B;5) count(*) on table Z says 2 records (correct);6) hit Back button;7) count(*) on table Z says 1 record (incorrect). If I link back to script A, rather than use the Back button, then count(*) says 2 records as it should.If I wait long enough before pressing the Back button (10 minutes) then script A, count(*), says 2 records. This is happening regardless of whether I use mysql_connect or mysql_pconnect. It is also happening regardless of whether or not mysql_close (or mysql_commit) is issued after each insert. As I have read many times recently, the Back button is not your friend. Thanks in advance for any help you can offer.
  24. Err

    What's wrong with this?

    function dbErr($num,$n) { switch ($num) { case 1044: case 1045: $err = err("Access to \"{$n}\" denied using current DB User and/or DB Pass."); break; case 1049: $err = err("The database \"{$n}\" does not exist."); break; case 2002: $err = err("There is no such DB Host. Check spelling."); break; default: $err = err("There is a problem connecting to the database. ".mysql_errno().": ".mysql_error()); } return $err; } function dbConnect($h,$u,$p,$n) { if (!$con = @mysql_connect($h,$u,$p)) {$err = dbErr(mysql_errno(),$n);} else if (!@mysql_select_db($n,$con)) {$err = dbErr(mysql_errno(),$n);} return (isset($err)) ? $err : ""; } I got told my code was wrong so I come here hoping people can prove there is a fault in my code. I suspect that people are simply not understanding some PHP syntax. If you can find anything wrong with this, let me know. Edit: I should note that the code works fine, but since I was told by several people it was wrong, I'm out to be proved wrong.
  25. I would like to offer to the visitors of my website the possibility for them to enter their email address in order to receive sometime a newsletter from my website.How to code the input form to get their email address?How to code the procedure to check the good validity of the email?How to code the storage in MySQL?How to code the procedure of sending an email to confirm the subscription and also to propose a link to unsubscribe?How to code to retrieve the email stored in the database when wishing to send a newsletter?And then, how to code the sending of this newsletter? I am ok with HTML/XHTML & CSS but I need help regarding how to handle PHP, MySQL and other things necessary to do the above project. Can someone help me? Thanks.H Olivier Dauxais.
×