Jump to content

Search the Community

Showing results for tags 'SELECT'.

  • 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. Hi there, Could anyone please help me to combine the below SQL statements such that the result is a 4 column table as shown in my screenshot? /* entire table here */ SELECT AutoNumber, DDAte, Amount FROM LedgerTransactions LT WHERE DDATE >= DATEFROMPARTS(2019,01,01) AND LT.AccNumber IN (select distinct AccNumber FROM LedgerMaster) ORDER BY ddate DESC /* add CoName to above table as 4th column, same value for every row */ select CoName from LedgerParameters Thank you in advance, Michelle
  2. Bonjour, Je suis entrain de créé un projet pour un site personnel, et j'aimerai savoir comment, avec deux <select> utilisé une condition pour ne pas affiché les mêmes propositions dans le deuxième <select> suivant ce qui a été choisi dans le premier. Merci
  3. <table border=1 colspan=50% width = 101% bgcolor = "#00012a" size=20%> <tr><td><select name="dept" color ="#0011a1"><option value="u" selected>DEPARTMENTS <option value="ap"><a href='code1.php'><a href='code1.php'>APPLIED SCIENCE DEPATMENT</a></option> <option value="pur">PURE SCIENCE <option value="soc">SOCIAL SCIENCE <option value="hum">HUMANITY </
  4. Hi, I've followed this W3 TUTORIAL to build a Custom Select Menu for my web application, which is now in production. According to the local law, my application now has to be accessible (WCAG 2.0 Pattern). The problem is that custom select menu (link above) doesn't provide a tab selector (for keyboard users), and my webapp fails in accessibility. I've tried to use "tabindex" attribute in .custom-select DIV, but it was not enough. Does anyone know how to make this accessible for keyboard users? I'm afraid of having to change all the selects of my application because of this. Tha
  5. Hi all, I am populating the <options> of a <select> statement from a database using php. I'm setting the value of the options to the 'workerID' and setting the innerHTML to the worker name, reading both of these values from the database table 'workers'. The 'input' button runs the php and I have the workerID as a value, but then I have to access the table again matching the workerID in a where clause to get the first & last name of the worker. It seems kind of redundant to do it this way - the question is, is there any way to pass along the worker name (which you just looke
  6. I have used combo boxes for years in Access and the 'select' element on an html form is similar. All of the tutorials on w3 show how to fill the 'options' with literal values, but I would like to have the options be filled from a table in a database so the user can select one. I know this is probably a cross-topic item and I have an idea of how to go about it using javascript, php and sql, but I thought I'd ask if anyone knew of a procedure which is already created for this. In Access you just enter the row source for the combo box and the options are there - is there any kind of construc
  7. SET-UP: Please find below three items including; one, the relevant form elements of a much larger form; two, the Javascript that determine what data will be sent to a PHP processing page via a $_POST variable, and three, The actual implementation of the code. The question follows the presentation of the code. The HTML <div id='language_options' style='clear:both;'> <label for='nl_tongue'>Native Tongue:<span class="formlabel">*</span></label> <span class="rightfloat"> <select id="nl_tongue" name="language" style="width:150px;"> <op
  8. PROBLEM: Turn a two-step SELECT procedure into a one-step procedure. The two-step procedure is 1) Discover with a query to a parent table what other rows in the parent table are related to the queried row. 2) Obtain selected data for the queried row and other related rows from the parent table and a child table that are connected by a FOREIGN KEY. BACKGROUND: I have two tables -- a parent (parent_table) and a child (child_table) table - connected by a valid FOREIGN KEY and an additional table (ref_table) that contains information about the relationship among the rows of both
  9. GOAL: Use one <select> element to determine the selected option of another <select> element without destroying the ability of the second <select> element to override the selection made by the first <select> element. BACKGROUND: My biggest difficulties in my attempt to achieve the above goal are: reading the value of the first <select> element's manually (not the automated) selected option. forcing the second <select> element to perform as if it were manually selected. Please consider the following two select statements and answer the f
  10. QUESTION ONE: What is it called when you traverse an entire table in equal multiples of records? (I ask this question, because I have been fraught with frustration in my google searches.) QUESTION TWO: Do you know a routine that I can copy and modify? (This would greatly simply my search.) BACKGROUND: Surely there must be a standard routine for performing the following procedure: 1) Use PHP to read and display the first ten records of a MySQL table. 2) Read and display the next ten records of the same data table. 3) Either return to the previously read ten record
  11. Hello, I have a variable ($post) that contains posted content from database. Now I want to select the first paragraph and insert a code after it (Ads precisely ). Here is my code <?php include "../modules/gfuncs.php"; $topicId=(int)$_GET['id']; #check if topic exists $q=$conn->query("SELECT * FROM topics WHERE id='$topicId'") or die( $conn->error ); if(mysqli_num_rows($q)==0){ header("location: $thisDomain/notfound"); exit; } #check for post $c4p=$conn->query("SELECT * FROM posts WHERE topicid=$topicId") or die($conn->e
  12. Hi, I am trying to learn basics of the SQL and following the tutorials on w3schools. Yesterday I was reading SQL Aliases and "Trying it myself". The following code returns 10 rows, each of them being zero. Am I missing something? SELECT FirstName + ' ' + LastName AS Name FROM Employees; Thanks.
  13. Hi all, I have a question about join or inner join; not sure in what way it should be used. I now use 2 queries in 2 different databases (made in phpmyadmin). SELECT `title` FROM `writers` WHERE id ='qwert58efedd1979f'; SELECT `name`, `lastname`, `str`, `nr`,` place` FROM `client` WHERE id ='qwert58efedd1979f'; I would like to make one mysql query and use join to search in 2 tables in 2 different databases. Can anyone tell how mysql does this?
  14. Hi all, <?php require 'db/connect.php'; $result = $db->query("SELECT * FROM people"); ?> I obtained a blank page running the above script, which indicates that everything is fine (path and table name are correct). I then removed the * from the query to see if it would report an error, but it did not. I added print_r($result); and run it. Nothing has changed. I included the * and run, it reported the number of rows and columns in the table. Why there has a been a lack of error reporting in this instance, noting that the ini file is configured to report all sorts of errors
  15. 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
  16. I have a piece of code where I use MYSQL to add records into a database. Here I use INSERT, but I want to work with UPDATE. The user selects records which have to be updated. The records have a unique number. I hope people can help me how to convert MYSQL code into PHP. The MYSQL code used in the console is this: UPDATE table_name SET input2='my input here ' WHERE rec_number = 2; The part of the script I use looks like this: <?php $name1 = $conn->real_escape_string($input1); $name2 = $conn->real_escape_string($input2); // $sql = "INSERT
  17. I am attempting to create a drop down menu and I liked the style of the top home menu seen here http://www.lego.com/en-us/products (right near the lego symbol) but I am not sure how to create a similar one would some one gI've me guidance on how I can do this I just started html coding so I am a noon with little knowledge of html right now.
  18. So my goal is now to have a table list read from the database. The content of the table is supposed to be put in an <SELECT> <OPTION VALUE> form for a dropdown menu having the user select only 1 value. $conn = new mysqli($servername, $username, $password, $dbname); if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $sql = "SHOW TABLES"; if (!$result = $conn->query($sql)){ die('There was an error running the query[' .$conn->error. ']'); } foreach($row = $result->fetch_assoc()){ echo "<
  19. Beeing in a HTML page how can I return a PHP array into a Form's datalist input ?
  20. Dear All; Need your help. I am programming students' roll call in ASP with SQL 2008 R2. There are about 100 students. By default option selected is 'Present' using drop down list. I tried to use radio buttons but only one button remains selected so I am using drop-down list ( How to select multiple radio buttons?). After selecting "Present", "Absent","Late" etc, how do I insert all 100( or whatever number) of rows in the SQL table simultaneously? How should I use "for", "loop" or any other method? Please guide. Regards DAMODAR
  21. i'm trying to select columns with multiple conditions. i want to select all 'tr_type' for all 'aid's but not 'SALES' & 'PURCHASE' for aid in '1' & '2'. i tried --- SELECT * FROM tran WHERE aid NOT IN ('1','2') AND tr_type IN ('SALES','PURCHASE') ORDER BY date it didn't work. please suggest....
  22. why these lines are not working? $sql3 = "SELECT *,sum(amt),sum(qty) FROM purchase WHERE sid=$sid AND pvn!=0 ORDER BY pvn DESC LIMIT 2";$result3 = mysqli_query($connect, $sql3) or die(mysqli_error($connect));$row3 = mysqli_fetch_array($result3);echo $row3['sum(qty)'] . "<br />";$sql4 = "SELECT *,sum(amt),sum(qty) FROM purchase WHERE sid=$sid AND pvn!=0 ORDER BY pvn DESC LIMIT 3";$result4 = mysqli_query($connect, $sql4) or die(mysqli_error($connect));$row4 = mysqli_fetch_array($result4);echo $row4['sum(qty)'] . "<br />"; they both SELECT result from the complete rows on 'purcha
  23. I need the widget to be in my website. Any easy way that i can walk around to embed a widget inside my web can help
  24. how to make a dropdown menu on a FORM with the datas from a column of a database table like items from all rows of a "MEMBERS" table's "NAME" column
  25. I am a beginner / intermediate MySQL user, but I need what I believe is a fairly advanced sql query, and I haven't been able to figure it out on my own. If someone could please help, I would really appreciate it. Here is my current query, and it IS returning valid data: $result = mysqli_query($con, "SELECT r.asset_title, r.alt_code, r.studio, r.type, r.start_win, r.end_win, r.rcv_date, r.pub_date, r.date_r4qc, r.qc_status, r.qc_notes, r.re_qc_date, r.promo_date, from_unixtime(ft.in_time) AS in_time, f.description AS description, left(ft.file_name, 20) FROM calendars r, tracker ft,
×
×
  • Create New...