Jump to content

Search the Community

Showing results for tags 'sql'.



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 197 results

  1. HarrySeah

    relational algebra

    hi, sorry, i have a question to do...but i know how to write in sql query ....however the answer need to write on relational algebra in query is like : SELECT * FROM operation where r='broken' group by pc having count(pc) >1 ; π id,pc,result ( σ r = 'broken' (operation)) like group by and having clasue...i no idea ... i searched on internet still @@ .... isnt the answer like that, i using split/step by step method to do rel 1 = σ r = 'broken' (operation) rel 2 = σ count(pc)>1 γ pc,count(pc) (rel 1)) rel 3 = π id,pc,result (rel 2 ) thanks
  2. Hello W3Schools Forum! This website keeps getting better. Used to I hardly ever visited it. Now it's one of my primary go-to destination points for programming information. I really do appreciate the information. I have got a question about the DISTINCT. http://www.w3schools.com/sql/sql_distinct.asp I cannot get the two column format to work. SELECT DISTINCT column_name, column_name // Can't get this one to work. FROM table_name; I can get the query to work with one column. SELECT DISTINCT column_name // It works fine using just one column. FROM table_name; It's worth noting. I have got a GoDaddy shared hosting. GoDaddy technical support says the hosting is on one of the older machines. The highest version of PHP is PHP 5.4 on the server. It's probably got an older version of MySQL, also. That could be the problem. I have been with GoDaddy since 2003. I am starting to look around for other hosting providers.
  3. Hi i am new for the PHP, i had the experienced before to do a login system page but what i want it is HTML and PHP file to separate i dont want PHP with HTML together to 1 file , cause professional people will more likely to use 2 file rather than 1 file easy to maintain and edit how to use the external PHP file coding without re-design whole page cause normally what i tested before was link or turn to other new page and result will come out but the design was totally gone so have any ways and suggestion to do that ... in the end, im sorry i not well in english and my knowledge of PHP still quite new , thanks you so much
  4. HI i trying to create a website of forum textarea editor are necessary too for recommendation which editor are best for textarea such as summernote, wysihtml5 .... and how is work to store the data/value/text with styling effect in mysql database ? Thanks all of you
  5. HI i trying to create a website of forum textarea editor are necessary too for recommendation which editor are best for textarea such as summernote, wysihtml5 .... and how is work to store the data/value/text in mysql database ? Thanks all of you
  6. HI i trying to create a website of forum textarea editor are necessary too for recommendation which editor are best for textarea such as summernote, wysihtml5 .... and how is work to store the data/value/text in mysql database ? Thanks all of you
  7. <?php $serv = "localhost:81"; $user = "root"; $password = ""; try { $con = new PDO("mysql:host=$serv;dbname=test", $user, $password); $con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); echo "Successfully connected."; } catch (PDOException $e) { echo "Connection failed: " . $e->getMessage(); } ?> Here I'm trying to use PDO to connect to my SQL database "test". However, I receive this error each time I connect: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it. Am I connecting with the wrong server, user or password? Because I fail to see here the mistake.
  8. I am In the process of trying to create a web comic aggregation website in php/HTML/JavaScript. I already have a mostly functional PHP RSS feed reader that grabs the image source URLs from a given feed. I am now trying to add the functionality to add these URLs to a database, as well as to download the images to a file system. I am trying to decide on a database API, but am having trouble. From my research, it seems like MySQL is pretty much perfect for what I am trying to do, unless the website grows too popular or the database grows too large, in which case I am told that MySQL will slow down significantly. Initially, the database shouldn't be that large, but over time, it will grow from RSS feeds and probably from the addition of new comics. Also, I don't think the website will become incredibly popular, but if it did and then promptly ceased functioning due to lack of a scalable database, that would certainly be a shame. I am also considering other SQL APIs, such as Microsoft and Oracle SQL. However, from my research, it seems like MySQL is easier to use, cheaper, and has more resources to explain how to use it. So I am torn. Any recommendations for which one to choose? Another option I am considering is to start developing in MySQL, and then if I ever run into significant performance issues from database size or website popularity, to switch to one of the more robust database APIs. I have read that this isn't too hard, but am suspicious. Can anyone give a second opinion on this assessment? PS: I am currently running Windows 7 and developing in NetBeans 8 with XAMPP, although if and when I ever launch my website, I plan on getting a hosting plan and not hosting it myself. Help would be much appreciated
  9. Hello, I am trying to create a web comic aggregation website in PHP/HTML/JavaScript. Currently, my general design plan for the website is an RSS reader that periodically checks various web comics for new comics, and then adds these comics to an ever-growing database, which is then accessed via the client side of the website and displayed in a user-friendly and interactive format. I also may eventually attempt to use web scraping to backfill the database with all the previous comics from before the RSS updater was launched. Currently, I have created an RSS reader that gets the image source of all the comics from a given RSS feed. So mostly I would want to be storing text strings (the URLs) along with some kind of organizational keys (probably based on publication date). Currently, it is not particularly important to me that this information be kept secure at all, although I may eventually add an account creation option in which case I would need to securely store usernames and passwords. I would also like to back up all the comic links I gather by actually downloading the images somewhere (in case the links ever get changed or taken down). Finally, this database can be the same for every user of the website, although it needs to be able to get very long (probably between thousands and hundreds of thousands of individual comics), and of course I would like it to be reasonably quickly accessible so my site isn't incredibly slow. After some research online, it seems like I could use simple file storage, or some kind of database storage API, such as MySQL or Microsoft SQL Server. I was wondering what the advantages and disadvantages of these various options might be (and if I missed any major options), along with how server-side web storage generally works? For example, when I actually launch my website, I know that I would have to rent a server from somewhere or set one up myself. Would I also have to rent a database storage means along with this? How would that generally work?
  10. Hello. Apologies, if I've posted in the wrong forum. What I would like to ask is. I'm creating a simple login screen, and once the user's username and password is matched with what's held on the database. I would like to store the user's fullname, email and membershiptype in a session so I can call it up in another php file later on. At present, I'm able to connect and open the database, then read from it. Then I'm getting stuck. I'm getting errors on lines:- $member_members_id = $_REQUEST['member_id']; $member_fullname = $_REQUEST['fullname']; Could any one please help? Thank You.
  11. Hi, I need a tutorial (in .pdf) on how to make a login page for a web app and secure password database using MS Access. Do you have any reference? Thanks!
  12. Hello Community - I am trying to figure out the sql query to provide me the results that I am looking for in date range from now to 7 days prior. Use Case: When running sales reports for our company, I would like for the query to look at the database and basically pull the last 7 days data. How is this done and could you direct me in that direction, please? Thank you in advance. -Isaiah
  13. diiazopde

    php & sql problem

    hi i'm trying to create an app with php but i have a real problem , i need help , please and thank you // login.php function check_user_authentication(User $user)//return the user id if exist in data base else return false { require_once ('../app/models/loginDataBase.php'); global $data_base_login; $request = $data_base_login->prepare('SELECT id FROM membres WHERE password= :password AND email = :email '); ///my problem is in this line $request->execute(array( 'password' => $user->getPassword(), 'email'=> $user->getEmail() )); $id_user = $request->fetch(); $request->closeCursor(); if ($id_user) return $id_user; else return false; } //app/loginDataBase.php try { $data_base_login = new PDO('mysql:host=localhost;dbname=espacemembre;charset=utf8', 'root',''); $data_base_login->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch(Exception $e) { die('Erreur : '.$e->getMessage()); } the error is :Fatal error: Call to a member function prepare() on null in C:\xampp\htdocs\youMvc\app\models\Login.php on line 14 thanks every one
  14. I have learned a lot from W3schools, but I wished there was more tutorials on placing variables within variables - like in PHP inserting Variables in other commands. $SQL= Insert into table; $database = $SQL where order = 1; I know this may not be properly inputted, but that is the basic idea. i do a programming within different languages, but syntax is always the hardest to figure out sometimes. I would love if I had one good model from one main site of doing things such as this for a lot of commands and formatting. Thanks for everything so far!
  15. I have written a SQL Query for my Database at work in Excel so that I can automatically update it. Took me a while to figure out the date sections and getting it to return just the current date with the below code. WHERE f.FolioStatusId in (1, 7, 8, 9, 13) AND cast(f.made_on as date) >= cast(getdate() as date) What I'd like to do is to have a section in Excel where I can type the Dates that I need the data from and too. I know that I can insert a "?" in the query section to make a cell reference but cant figure out what code would need to go in the WHERE section to do that. Any help would be greatly appreciated!
  16. It would be useful to have either a page on SQL TRUNCATE TABLE or a mention of it in the SQL DELETE tutorial. "DELETE from <table>" or "DELETE * FROM <table>" is recommended as a way to delete all data without deleting the table itself. Is this just a synonym for TRUNCATE? Is it guaranteed to do this as efficiently?
  17. I question whether using JPA, you can ask a single SQL statement to the combined relationship of two tables from different manufacturers, for instance MySQL and MS SQL or Oracle ? Is there any way to do this using Java ?
  18. Hi, I am considering to have two tables related to investments: 1) investors 2)invested money, with a link between the two. For the second table, besides own id and id linking to the first table, there are: investment received, paid money (e.g. profits, paid capital etc.), and dates associated with investment and paid money. There is also some money deductible which is relevant to tax, exchange rate, expenses, etc. I have two options: having those deductions as part of the second table with proper formulas, or keep the table simple and have deductions not in the table but rather as part of the accounting work in accountants' books. I would appreciate if someone knows what could be the best/advisable professional practice.
  19. I am trying to filter a table between two dates in ms access from vb.net . the query below does Not work when data type is date/ time . When I change data type to text, it gives me sum of the columns. Is there anyway to fix it? Thanks select * into Table3 from (SELECT 'Table6' AS [Table], SUM(a) - SUM( AS Result FROM table6 where date_ BETWEEN " & FromDate & " AND " & ToDate & " UNION ALL SELECT 'Table7', SUM(a) - SUM( FROM table7 where date_ BETWEEN " & FromDate & " AND " & ToDate & ")a"
  20. Hi I have Business Management degree. I have been unemployed for few years and stay home. I would like to study something new and I like. I spend a lot of time on computer and go on internet so I am thinking learning SQL lessons from this site. About IT or SQL are new for me, start from zero. The site doesn't have a certification for SQL. My questions are If I finish learning the course from the site, what I have to do next, can I get job right a way, what job or work can I apply, what position should I looking for, since I don't have a certification? Please give me some advices. Thanks
  21. Hi, Can anyone recommend anywhere that I can learn code part time in the United Kingdom? I have been teaching myself html, css, etc on a basic level & now venturing into php, mysql, js, etc & think that having a tutor or guidance would really help speed up my learning process. Any companies or colleges offering part time courses in these area's will hopefully fill in the holes in my knowledge & help me progress. I'm not really concerned about qualification certificates, the knowledge is more important to me. Thanks for any advice. Old Guy.
  22. I'm having trouble with getting the image in the right order. I'm trying to filter images gotten from the database based on the button link. I got the reference from http://www.evoluted.net/thinktank/web-development/jquery-filtering. I have about 20+- buttons and for each button, I am getting all the picture that is being under that filter button through database. (Not sure where to post this, but I think it's more suited to be under css). Basically, I have gotten the css all wrong (my css is basic too ><), so I hope you could help me(where i have gone wrong) and give some pointers. Here is css: /*- FILTER OPTIONS -*/ul#filterOptions { width: auto; height: auto; margin-top: 60px ; ; overflow: hidden; list-style: none;}ul#filterOptions li { height: 52px; margin-right: 2px; float: left;}ul#filterOptions li a { height: 50px; padding: 0 20px; border: 1px solid #999; background: #cfcfcf; color: #fff; font-weight: bold; line-height: 50px; text-decoration: none; display: block; list-style: none;}ul#filterOptions li a:hover { background: #c9c9c9; list-style: none;}ul#filterOptions li.active a { background: #999; list-style: none;}/*- -*//*- OUR DATA HOLDER -*/#filterBody { width: 100%; height: 100%; overflow: hidden; list-style: none;}#filterBody div.item { width: 200px; height: 200px; float: left; text-align: center;}#filterBody div.item h3 { margin-top: 10px; font-size: 16px; line-height: 20px;}/*- -*/ My html/php code looks like this (example of 1 button): <!----------------- The filter buttons will be these--------------------------> <ul id="filterOptions"> <li class="active"><a href="#" class="all">All</a></li> <li><a href="#" class="IS_1">C#</a></li> <li><a href="#" class="IS_2">PHP/MySQL</a></li> <li><a href="#" class="IS_3">HTML/CSS</a></li> <li><a href="#" class="IS_4">Java Enterprise Development</a></li> <li><a href="#" class="IS_5">Mobile Application Development</a></li> <li><a href="#" class="IM_1">Web Design</a></li> <li><a href="#" class="IM_2">3D Modelling & Animations</a></li> <li><a href="#" class="IM_3">Graphic Design</a></li> <li><a href="#" class="IM_4">Video Editing</a></li> <li><a href="#" class="IM_5">Motion Graphics & Effects</a></li> <li><a href="#" class="CNET_1">Network Security</a></li> <li><a href="#" class="CNET_2">RB Network Design & Implementation</a></li> <li><a href="#" class="CNET_3">Broadband Access & WAN</a></li> <li><a href="#" class="CNET_4">ICT Infrastructure Management</a></li> <li><a href="#" class="CNET_5">Technopreneurship Project</a></li> <li><a href="#" class="ITSM_1">Virtualisation & Cloud Computing</a></li> <li><a href="#" class="ITSM_2">IT Service Operation & Management</a></li> <li><a href="#" class="ITSM_3">Server Administration & Security</a></li> <li><a href="#" class="ITSM_4">Database Administration & Management</a></li> <li><a href="#" class="ITSM_5">Internet of Things App Development</a></li> <!--<li><a href="#" class=""><?php ?></a></li>--> </ul><!--------------Filtered contents to be through the button--------------------><div id="filterBody"> <!----Filter contecnt of C#------> <div class="item IS_1"> <p> Hello everybody!</p><?php try{ //connect to the database require("Connections/database.php"); // array to hold errors $errors = array(); if(empty($errors)){ //select portfolio picture from database $query = "SELECT p.*, u.skillset FROM portfolio p INNER JOIN userProfile u ON p.user_id = u.user_id WHERE u.skillset LIKE '%C#%' "; //var_dump($query); $stmt = $database->query($query); foreach ($stmt as $row) { //print out the data ?> <div id= "imagesPortfolio"> <img src="<?php print htmlspecialchars($row['imagePath']); ?>" width="100" height="100"> </div> <?php //print $row['imageName'] . "t"; //print $row['Name'] . "t"; //foreach($row['picPath'] as $picURL) { //$picURL = $row['picPath']; //'<img src="'. $dir. '/'. $file. '" alt="'. $file. $ //} // print '<img src="'. $picPath. '/'. $file. '" alt="'. $file; //print $row['introduction'] . "n"; } } foreach($errors as $error) { printf("<li>%s</li>", $error); //exit(); } } //end of try block catch(PDOException $e){ // end of database dependent code, handle any errors $status = empty($query) ? 'Connection failed':" Query failed: $query"; // application message trigger_error("$status, Error: {$e->getMessage()}, File: {$e->getFile()}, Line: {$e->getLine()}"); // user message $errors[] = 'Sorry, this page is not working at this time.';}?> <!---The like system implementation----><!-- <div class="like-btn">Like</div> <div class="dislike-btn"></div>--> </div><!------Other buttons same as this buttons, only filter name different--------></div> Is my concept wrong? >< I think i have misinterpreted somewhere, I just can't point out whether it's the css, the php or both ;-; I need to put 6 images in a row, and I'm not sure how to do this in the foreach loop too ><
  23. Dear Friends , I am just going through SQL Stored Procedure which is previously created. it contains mail Generation in HTML through SQL. in following code i am not able to understand use of number (1) & (2) please explain me. ----------------------------------------------------------------------------------------------------------------------SET @tableHTML = N'<H>MRP Indent Details</H>' + N'<table border="1">' + N'<tr><th>Indent Code</th><th>Indent Date</th><th>indent Type</th>' + N'<th>Approved BY</th><th>Cost center</th><th>No Of Items</th><th>Approximate Rate</th></tr>'+ CAST ((select td=a.Indentcd,' ', (1) ' ' td=a.IndentDt,'', td=a.indenttype,' ', td=a.ApprovedBy,' ', td=a.ccncd,' ', "td/@align" = 'right',td=a.Itemcnt,' ', "td/@align" = 'right',td=a.mthwtavgrate,' ' from TmpMRPMail a FOR XML PATH('tr'), TYPE ) AS NVARCHAR(MAX)) + N'</table>' ; (2) XML Path -----------------------------------------------------------------------------------------------------------------------
  24. I get the error ERROR 1066 (42000): Not unique table/alias:I cant figure out whats wrong with it.SELECT p.id as id_produk, p.nama_produk, p.stok, p.url_title, p.deskripsi, p.file_name, p.id_kategori_produk, p.fk_jenis_id,p.fk_merk_id, p.fk_gudang_id, p.created_at, kp.id, kp.nama_kategori, jm.id, jm.jenis_material, mm.id, mm.merk_material, gm.id, gm.gudang_material FROM produk as p, kategori_produk as kp, produk as p, jenis_material as jm, produk as p, merk_material as mm, produk as p, gudang_material as gm WHERE p.id_kategori_produk = kp.id, p.fk_jenis_id = jm.id, p.fk_merk_id = mm.id, p.fk_gudang_id = gm.id ORDER BY created_at DESC LIMIT 0, 15Filename: C:xampphtdocstelkomaksessystemdatabaseDB_driver.phpLine Number: 330
  25. jaylow

    foreign key error

    Hello, i have 2 tables. one is for users to sign up and the other is to make character. i added a foreign key to the character table to link it to the members table not when i sign up it just adds me to the table but when i want to make a character it give me this error i want to link the character_id to the id in the members table, so i know what character belongs to what member.. i get: ERROR:could not able to execute INSERT INTO `character` (charname, ######, gold, xp, accdate) VALUES ('jay', 'male', 100000, 0, now()).Cannot add or update a child row: a foreign key constraint fails (`secure_login`.`character`, CONSTRAINT `character_ibfk_1` FOREIGN KEY (`character_id`) REFERENCES `members` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) Members table: CREATE TABLE IF NOT EXISTS `members` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(30) NOT NULL, `email` varchar(50) NOT NULL, `password` char(128) NOT NULL, `salt` char(128) NOT NULL, `accdate` timestamp NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; `character` table: CREATE TABLE IF NOT EXISTS `character` ( `id` int(11) NOT NULL AUTO_INCREMENT, `character_id` int(11) NOT NULL, `charname` varchar(30) NOT NULL, `######` tinyint(4) NOT NULL, `gold` int(11) NOT NULL, `xp` int(11) NOT NULL, `accdate` timestamp NOT NULL, PRIMARY KEY (`id`), KEY `character_id` (`character_id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;---- Constraints for table `character`--ALTER TABLE `character` ADD CONSTRAINT `character_ibfk_1` FOREIGN KEY (`character_id`) REFERENCES `members` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; without a foreign key i can update the characters table without any issue i messed around with the tables for the last two hours and just dont know anymore. if i switch the foreign key to my members table the sign up does not go into the members table
×
×
  • Create New...