• Member Avatar for AndrisP
    AndrisP

    Replied To a Post in INSERT INTO with LAST_INSERT_ID()

    Actually it do not affect any changes - `on duplicate update ...` in your example supress error message. The same can be achieved with `insert ignore into table ...`
  • Member Avatar for AndrisP
    AndrisP

    Began Watching INSERT INTO with LAST_INSERT_ID()

    My code has a query that looks like: INSERT INTO table VALUES (...) ON DUPLICATE KEY UPDATE id = LAST_INSERT_ID(id), ... id is a PRIMARY KEY. My question is that …
  • Member Avatar for AndrisP
    AndrisP

    Gave Reputation to Dani in can you convert it by Java please?

    What language is it currently in? What is it supposed to do?
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Reverse Word Order

    It's a very simple in single row: string='India is a democracy' print (' '.join([word for word in reversed(string.split(' '))]))
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Reverse Word Order

    Write a function that takes as argument a string containing multiple words and returns a string containing the same words in reverse order. Eg., input = 'India is a democracy'; …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in JS Form - showing field supposed to hide

    You can add to CSS .PaperApplication { visibility: hidden; } for set element with class PaperApplication hidden by default. After click radio button function change it to visible.
  • Member Avatar for AndrisP
    AndrisP

    Began Watching JS Form - showing field supposed to hide

    This mostly works. It shows the SSN when the first Val radio button is picked. It also shows the PaperAppliction when the second Val radio button is picked. The ONLY …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Get next three months from current month in javascript

    In JS months numbered from 0 to 11. Actually 11 is december. You can write simple function function addMonths(d,n){ var dt=new Date(d.getTime()); dt.setMonth(dt.getMonth()+n); return dt; } and then e.g. var …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Get next three months from current month in javascript

    Am looking for something where I could get a array of next three months in number from the current month , i have tried to get the month in string …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in How to insert subjects with its grades into the database using php

    Please post human readable HTML
  • Member Avatar for AndrisP
    AndrisP

    Began Watching How to insert subjects with its grades into the database using php

    I am a beginner to php and am designing student information system where students need to enter 9 subject and its corresponding grade based on the number of sittings. Is …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in how to insert multiple data of array of checkbox in database

    In your HTML code `<table>` not opened, table row `<tr>` not opened, invalid `<input>` tag without `>` - it should be something like if($result->num_rows > 0){ echo '<table>'; while ($row6 …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching how to insert multiple data of array of checkbox in database

    i have manage to insert my checkbox array data into database. the problem is when i check multiple checkbox only the first data in array is inserted in database. i …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in unexpected result in mysql query

    Use backticks instead of apostrophes `attendence` AS 'type' ,`in_address` AS 'address_in' ,`out_address` AS 'address_out'
  • Member Avatar for AndrisP
    AndrisP

    Began Watching unexpected result in mysql query

    [MYSQL] my query is:- SELECT * FROM (SELECT 'attendence' AS 'type',userAS 'username', STR_TO_DATE(in_time, '%d-%m-%Y %H:%i:%s') AS 'time_in', 'in_address' AS 'address_in', STR_TO_DATE(out_time, '%d-%m-%Y %H:%i:%s') AS 'time_out', 'out_address' AS 'address_out' FROM attendence …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in How to display data into radio but

    Inputs should be inside form. Inputs with similar names should be pass as array. <input type="checkbox" name="name[]" value="<?php echo $name;?>" /><?php echo $name;?>
  • Member Avatar for AndrisP
    AndrisP

    Began Watching How to display data into radio but

    Hi, I want to make online shop and I made most of it but I have problem on product page.I want for "customers" ( this is my personal project so …
  • Member Avatar for AndrisP
    AndrisP

    Gave Reputation to joseph_40 in plsssss help :,(

    guys pls help me ,, how can i make a matrix round rounbin display ,, if you have an idea thats a big help for me
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Is /etc/services still alive anymore?

    Command enable/disable managed auto start of service on PC switch on or restart but for start/stop service must be used start/stop/restart command or you can check status using command `status` …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Is /etc/services still alive anymore?

    List of enabled/disabled srvices `~$ systemctl list-unit-files` Script for enable: #!/bin/bash for i in $* do sudo systemctl enable $i done Call above script with passing multiple arguments or call …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Is /etc/services still alive anymore?

    What I like to know is if network programs still use this file? I can comment out http port 80 without any effects on firefox: ># http 80/tcp ># http …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in [CSS/HTML] can't find whats wrong with my code

    HTML syntax is broken - line 103 `<div`, line 122 opened `<div>` is closed inside another table cell in line 144
  • Member Avatar for AndrisP
    AndrisP

    Began Watching [CSS/HTML] can't find whats wrong with my code

    So im trying to make a background switch by adjusting the z-index with a hover. I got it to work on one of my pages but the second page has …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Accessing TextBox inside iFrame checkout

    Must be use [contentWindow or contentDocument](https://www.w3schools.com/jsref/prop_frame_contentwindow.asp)
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Accessing TextBox inside iFrame checkout

    Clarifying previous question about Google Chrome Extension. I need to access the textboxes inside an iFrame. I believe I am accessing the iFrame because I can get at the height, …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in passing a variable XMLHttpRequest

    $height=$_GET['height']; $width=$_GET['width']; Your code raise PHP error if variable not set - must be check `if(isset($_GET['height'])){ $height=$_GET['height']; }` or much better you can use filtered variables [PHP - filter_input](http://php.net/manual/en/function.filter-input.php) $height …
  • Member Avatar for AndrisP
    AndrisP

    Gave Reputation to Ray Paseur in mysqli_fetch_array() expects parameter 1 to be mysqli

    It's the 21st century so you want to be using object-oriented MySQLi now. Here's a teaching example showing how to do the basics in MySQLi. It's always wise to test …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in passing a variable XMLHttpRequest

    This looks good. Show PHP code where you try to set variables to global or session.
  • Member Avatar for AndrisP
    AndrisP

    Began Watching passing a variable XMLHttpRequest

    I am getting a screen resolution through XMLHttpRequest. I am opening a show_content.php file with *xmlhttp.open* that contains screen resolution variables which I pull with the GET Method. xmlhttp.open("GET","show_content.php"+queryString,true); This …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Search in word in multiple text file

    But word `small` not in your text file examples
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Search in word in multiple text file

    Hi, im still new in c++ so i'm happy if anyone can help me Hi, is anyone know how to search two text file and the output will be - …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in mysqli_fetch_array() expects parameter 1 to be mysqli

    1. Uncripted password never store in to the database 2. Use prepared statement instead of direct passing variables to SQL query 3. Then write a question
  • Member Avatar for AndrisP
    AndrisP

    Began Watching mysqli_fetch_array() expects parameter 1 to be mysqli

    <?php session_start(); ?> <?php include('dbcon.php'); ?> <html> <head> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div class="form-wrapper"> <form action="#" method="post"> <h3>Login here</h3> <div class="form-item"> <input type="text" name="user" required="required" placeholder="Username" autofocus required></input> …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Query group by on datetime

    Sorry on MS SQL server use `datepart` instead of `extract`
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Query group by on datetime

    select min(`Date`), `Qty` from `tablename` group by extract(hour from `Date`);
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Query group by on datetime

    Sir I have this data ![Untitledg_jygukg.png](/attachments/large/4/e33bd064d12c1ff9b76646dc9376d4de.png) Group by hours Or First value of every hour Please help
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Need help with DB Schema - Post with multiple Categories and SubCategories

    Actually you can create multi level categories in single table if data structures are similar with references to self table . Second table contains references many-to-many e.g. create table `categories`( …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Need help with DB Schema - Post with multiple Categories and SubCategories

    Hi, I want to design DB for posts with multiple subcategories and categories. Example: Category has information: C#, PHP, JS, Python. Subcategory can contain: Logger, String, While Loop. A post …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in help please with this php code

    Use $id = filter_input(INPUT_GET, 'id', FILTER_VALIDATE_INT); if($id !== NULL){ ... } instead of lines 4,5,6, use prepared statement intead of direct pass variable (line 7) to prevent from SQL injection. …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching help please with this php code

    this code should send the id to the next form in the same html page <a href="newtestpage.php?id=<?php echo $post['C_ID'];?> #editEmployeeModal" class="edit" id ="<?php echo $post['C_ID'];?>" data-toggle="modal"> <i class="material-icons" data-toggle="tooltip" title="Edit">&#xE254;</i></a> …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in PHP Help copy content into a new file in a random dir

    Directory is created? Add to line 5 "or die('Cannot create directory')" eg `mkdir($dirname) or die ("Cannot create directory");` check web server error log file. Probably permission denied.
  • Member Avatar for AndrisP
    AndrisP

    Began Watching PHP Help copy content into a new file in a random dir

    Hello guys I'm trying to read a file copy content into a new file to a random directory: <?php error_reporting(E_ALL); $dirname = uniqid(); mkdir($dirname); $newFileName = '/'.$dirname.'/newfile.txt'; $newFileContent = 'someinfoinfile.txt'; …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Summarize events in XML via xslt

    replace XSLT to: <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:strip-space elements="*"/> <xsl:output method="xml" indent="yes" encoding="utf-8"/> <xsl:template match="/"> <doc xml:lang="de"> <xsl:comment>Termine</xsl:comment> <p class="T_termine_fussball"> <xsl:variable name="spieldatum" /> <xsl:for-each select="tabelle/vorschaupaarungen/vorschaupaarung"> <xsl:if test="spieldatum != preceding-sibling::vorschaupaarung[1]/spieldatum"> <span …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Summarize events in XML via xslt

    Moin together, I am relatively new to the matter and now I am faced with the task to solve the following topic. This is the source document that I get …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Problem In php

    Include database (line 9) should be outside of object `User` because in line 11 you define reference to db connection which is lost after comlete user construct
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Problem In php

    When I run script I get error Fatal error: Uncaught Error: Call to a member function prepare() on string in /Applications/MAMP/htdocs/sae/TT/public_html/includes/user.php:21 Stack trace: #0 /Applications/MAMP/htdocs/sae/TT/public_html/includes/user.php(40): User->emailExists('user1@gmail.com') #1 /Applications/MAMP/htdocs/sae/TT/public_html/includes/user.php(102): User->createUserAccount('userr', 'user1@gmail.com', …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in How to insert select values to multiple users checkbox in PHP MySQLi?

    `MySQLi` method is shown in my first respond. If you use `bindParam()` (PDO method - my second respond) `$con` should be PDO object. Read http://php.net/manual/en/mysqli-stmt.bind-param.php and http://php.net/manual/en/pdostatement.bindparam.php
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in How to insert select values to multiple users checkbox in PHP MySQLi?

    @Talib_1 this is (procedural) MySQLi method not PDO. The PDO would look something like this: $stmt = $con->prepare("INSERT INTO table(id,s_id,date,time) VALUES (null,:s_id,:date,:time)"); $stmt->bindParam(':date', $date, PDO::PARAM_STR); $stmt->bindParam(':time', $time, PDO::PARAM_STR); foreach($s_id as …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in How to insert select values to multiple users checkbox in PHP MySQLi?

    Use prepared statement instead of direct insert to prevent from SQL injection! Naming checkboxes with empty quadratic brackets e.g. <input type="checkbox" name="s_id[]" value="1" /> <input type="checkbox" name="s_id[]" value="2" /> <input …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching How to insert select values to multiple users checkbox in PHP MySQLi?

    Hi there I am new at this website thanks for every one that help me I have this output appear on the link below: [Click Here](https://ibb.co/fe8Cvf) I want to while …

The End.