Jump to content

Search the Community

Showing results for tags 'MySQL'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


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

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








  1. How To show category wise posts using custom fields i am use acf plugin and i want show custom fields page i have 3 custom fields 1 album 2 artist 3 lyrics and 2 category 1st remix 2nd top song i want creat deffrant page for all 3 fields like 1st page album where i can show all album with 1st category with paging See Below Attached file For Best Understanding
  2. Hi guys! I have a little problem and it's that I get an error in a determined function where I call my connection and I don't know why. The errors are: 1) Notice: Undefined variable: conexionidiomas in C:\wamp64\www\idiomas\preguntas-frecuentes.php on line 10 2) Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, null given in C:\wamp64\www\idiomas\preguntas-frecuentes.php on line 11 This is what I have from "/Connections/conexionidiomas.php": # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_conexionidiomas = "p:localhost:3307"; $datab
  3. Hi I want to bring this information to insert multiple records from select <?PHP error_reporting(0); include("connect.inc.php"); ?> <?php include "connect.inc.php"; if (isset($_POST['submit'])) { $province_id = $_POST['province_id'][$i]; $province_id = $_POST['travel_id'][$i]; $i = 0; foreach ( $_POST as $val) { mysql_query("INSERT INTO travel_list (province_id, travel_id) VALUES ('$province_id', '$travel_id')"); $i++; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html
  4. I need to check if value inserting in database while **import excel file** , if it has already value in database then it should get update. Below is producttab table value in database prdid | prdname 00A | prd1 00B | prd2 00C | prd3 00D | prd4 Below is EXCEL FILE data prdid | prdname 00A | prdnew 00B | prd2new 00E | prd8 00H | prd9 So if i upload above excel file then , 00A , 00B should get UPDATE IN producttab table as they are already present there... but 00E,00H should get insert below is what i have tried, value is
  5. I have a table which is either empty or has 1 record If the table is empty i cant retrieve info from the database and get an error message. my code: $sql = "SELECT id FROM users WHERE id = (SELECT MAX(id)FROM users)"; $result = $conn->query($sql); foreach ( $conn->query($sql) as $row ) { $id = $row['id']; the for each line gives an error message: how to solve this?
  6. Its PHP MYSQL : I have a table prodt , in which i first INSERT a value and with its LAST INSERT ID i do update for MAX + 1 as below , BUT I AM GETTING ERROR You can't specify target table 'prodt' for update in FROM clause $a = db_insert_id(); $sqllast = "UPDATE prodt SET pdname= ((SELECT pdname FROM ( SELECT MAX( pdname ) AS pdname FROM prodt WHERE oid = ".db_escape($oid)." ) AS pdname ) + 1 ), pcyn = ".db_escape(0)." WHERE id = ".db_escape($a)." AND oid= ".
  7. <?php include "connetti.php"; session_start(); $query = "SELECT id_studente, nome, cognome, anno_maturita, voto_maturita FROM utenti_studenti WHERE utenti_studenti.confermato = 0"; $risultato = @mysql_query($query); if (mysql_num_rows($risultato) == 0) { echo("Nessun elemento trovato"); header("refresh:3;url=AreaAmministratore.phtml"); exit(); } ?> <html> <head> <title>Annuario Studenti</title> <link rel="stylesheet" href="cssUtils/aggiungi_properties.css"/> <script type="text/javascript" src="jsUtils/jsUtils_annuario/ann
  8. Hello Every One I Want Show all USer last Useges Data From date of Last Recharge to To Date and condition With user owner by i Have 3 Table invoice - Need data from column date(need last invoice Last Recharge date For Below Table Condition Start ),username( Uniq In all table) acct - > Need data from column acctstarttime( For Start Date ),SUM( acct.acctinputoctets + acct.acctoutputoctets ) AS data(For Sum Of Useges Data ),SUM( acct.acctsessiontime ) AS acctsessiontime,username(Uniq In all table) users - > Need data from column username( Main Table Match username on this
  9. Below is products table : id | mid | wgh | remark| remkok | 1 3 1.5 r3ok 1 2 2 1.5 0 3 2 0.6 nice 0 4 1 1.2 okh 0 5 4 1.5 bye 0 6 4 2.4 okby 0 7 3 3.0 oknice 1 I want to display remark below tr of group by mid ....like below mid wgh 3 1.5 3.0 remarks : r3ok, oknice 4 1.5 2.4 remarks : bye, okby 2 1.5 0.6 remarks : , nice 1 1.2 remarks : okh **What i have tried as
  10. Hello everyone, I am not sure if this is the right place to post since I do not know for sure if it is PHP that causes my issue, so I apologize in advance if I shouldn't have posted here. I am using WampServer Version 3.0.0 64bit (Apache: 2.4.17 | PHP: 5.6.16 | MySQL: 5.7.9) on windows10. I am updating a website and I am keeping the database the same, except from some small optimizations here and there. I have a query that selects all active rows of a specific category, then I fetch the results and show the rows: if(mysqli_stmt_prepare($stmt, "SELECT * FROM myTableName
  11. Hello Everyone I M in Problem i Am creat my 1st project for client so plesese help me that how i done i need how i calculate field in php like this Pic total of Credit total of debit and pending balance and grand total So tell Me how i done Below i attecthed
  12. In PHPmyadmin I can't move the position of the columns. So when I go to change/modify (not sure how it's called in English) I get the possibility to move column and the place it after another column then where its placed now. Though, it does print the query it goes like ALTER TABLE `my_tab` CHANGE `col1` `col1` TINYINT(1) NULL DEFAULT NULL AFTER `col5`; I have not tested in the mysql console, but in PHP the columns don't move (anymore) like they did do beforehand.
  13. Hi everyone! Thank you in advance for reading this and any help you are able to provide. This has been a bit of a long road but I'm learning along the way. Before I begin I am well aware of the dangers of SQL injection and understand that using prepared statements would decrease injection attacks for the following code. This is a PHP/MySQL test code to see if it works before actual implementation on a live site. With that said here we go: I have a database and it contains four tables (for the sake of security I gave them disney character names) named huey, dewey, lewey and uncledonald. I wo
  14. http://prntscr.com/a3dz84 please check why it doesn't working ? i have been tested change date in local computer but nothing happen, thanks UPDATE `cu_employee` SET `cu_employee_sisa_cuti` = '12' WHERE 1
  15. Hello everyone, I'm brand new to PHP and MySQL and I'm trying to build a login/register form for my company's website. I've literally scavenged the internet for the past 3 days and have watched multiple tutorials but still can't get my database to link to the php file(s). If anyone can guide me in the right direction or provide a dummy proof tutorial, it would be greatly appreciated!!! (I would attach my php code but I literally have nothing and have gotten no where) Any advice would help. Thanks!
  16. So recently I got my hands on one of youtube videos, it's quit old, and the guy explaining how to create a form for uploading image and all data that is connected with it, to MySQL and then showing on your web site. So everything is ok, but webpage does not display any images, it just show me white picture frame with picture icon on the top. This is my connection file with database: <?php $hostname_phpimage = "***"; $username_phpimage = "***"; $password_phpimage = "***"; $database_phpimage = "***"; // Create connection $inkedmen_marko = mysql_pconnect($hostname_phpimage, $username_
  17. First, I've read all that W3 has posted about potential web servers plus followed those links and as many peripheral ones until I found myself totally snowed under by technical references and nomenclature that means nothing to me. I have never run a web server and never plan to publicly. This is only for local use of MySQL and PHP. Perhaps there are some who can help point me in a more productive direction or assess the feasibility of my plan to develop a rather straight-forward and (hopefully) simple-to-implement prototype of web pages on my desktop. Here is where I am: The host ser
  18. Hi I'm looking for php/mysql code to find identical input in a mysql database column.
  19. Arrrh! Can't install database. SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes, query was: CREATE TABLE `email_triggers` ( `id` int(10) NOT NULL AUTO_INCREMENT, `enabled` enum('0','1') COLLATE utf8_unicode_ci NOT NULL, `trigger_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `observer` varchar(255) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `trigger_name_2` (`trigger_name`,`observer`), UNIQUE KEY `trigger_name_3` (`trigger_name`,`observer`), KEY `trigger_name` (`trigger_name`), KEY `observer` (`observer
  20. Dear all, i have been working in my college project and i reached a point were i can't get my cart orders into Order history, as it's not working and keep giving me the following error page, Error : INSERT INTO `cib4003_h00233671_at`.`orderhistory`(`order_id`, `Product_ID`, `Product_Name`, `client_ID`, `quantity`) VALUES ('', '', '', '2', ''); Duplicate entry '0' for key 'PRIMARY' ^ i checked the databse and all values are 0 except the Client_ID... thats why i am getting Duplicate entry, however, i tried to fix the problem for the past few hours and i can't find the issue, her
  21. ugintl

    Database error

    I uploaded website files to the web root and when i tried to access it via www.mydomain.com it gave following error A Database Error OccurredError Number: 1146 Table 'webpk_16901224_app.sesion' doesn't exist INSERT INTO `sesion` (`session_id`, `ip_address`, `user_agent`, `last_activity`, `user_data`) VALUES ('1912dd6c2dd5c411cde798d9496c9a9a', '', 'Mozilla/5.0 (Windows NT 5.1; rv:42.0) Gecko/20100101 Firefox/42.0', 1448544788, '') Filename: libraries/Session.php Line Number: 328 I tried to create a table like following through phpmyadmin, but i get an error "key id d
  22. hello, Maby you can help me make somthing I have done things myself but i am a litle stuck it has somthing to do with my admin of product list like you can see in the picture i have done alot but now i want to ad a percentage i know that it has somthing to do with taking the result out of the column named (winstverlies) and devide that trough the purchese price and multiply this by 100 but i can not implement this in my code. the code is PHP so who can help me? so i want it to look like on the picture. is this posible? picture is in the file named percentage.jpg So i would be verry
  23. I am creating a table using phpMyAdmin. I would appreciate if someone would explain: In the collation, I am selecting utf8_general_ci. Is this OK? For indexing, when should I use ''unique and when would I use 'index'?
  24. 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 th
  25. What is the best way of capturing data sent via a contact-us form (I am using form and PHP)--in DB only, in a dedicated email only, or in both? Pros and cons of each method please, if possible.
  • Create New...