• Member Avatar for AndrisP
    AndrisP

    Replied To a Post in data not inserting into my database table

    Where you define variables `$textfile_occupation, $institution, $UserLogin` ? Where you execute `$query_insert` ?
  • Member Avatar for AndrisP
    AndrisP

    Began Watching data not inserting into my database table

    ********* problem====can't insert into my table but when i ver_dump it it shows all record needed to be insert==== Here is my sample code. ********* for ($col = 0; $col …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Undefined index: username

    Sorry mistake in my post `oci_prepare` is not a function - correct function name is `oci_parse`. Use similar variable names for connect to db and authorize user also is very …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Undefined index: username

    Check your post variables `print_r($_POST)`
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Undefined index: username

    To prevent from SQL injection bind variables after `oci_prepare` read http://php.net/manual/en/function.oci-bind-by-name.php
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Undefined index: username

    It raise in line 26 if post variable not set. Use function `filter_input ()` in lines 2 and 3. Remove lines 13-27
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Undefined index: username

    1. Password should be crypted! 2. In to the lines 2 and 3 variables defined - ok. But do not need set default values because if not set both post …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Undefined index: username

    <?php $username = "system"; $password = "Mwasif2001"; $connectionString = "localhost/ORCL"; $conn = oci_connect($username, $password, $connectionString); if (!$conn) { $e = oci_error(); trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR); } // username and password sent …
  • Member Avatar for AndrisP
    AndrisP

    Marked Solved Status for DaniWeb on Ubuntu Phone

    What has gone wrong with DaniWeb? It is no longer normal usable on the Ubuntu Phone.
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Display Images from different table

    Maybe browser show cached images. Try generate different file names to output image
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Display Images from different table

    Hello to all, I am trying to display the images on my page through php from mysql database Problem is - Images are repeating , It always display only first …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Insert with Update

    Sorry comma missing in my previous post <?php prepare("Insert into flood_light ( Name, Brand, Quantity, Detail, Unit, Color, Material, Image) VALUES(?,?,?,?,?,?,?,?) on duplicate key update set Name = VALUES(Name) ,Brand …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Help Me Debug

    line 13 should be `print(self.question)` and similar mistake in the line 22
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Help Me Debug

    Hi I am learning python and there is these two code snippets but I keep getting an error when I try to run the program. # survey.py class AnonymousSurvey(): # …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Insert with Update

    Set unique key constraint `image` and then insert/update in one SQL e.g. `prepare("Insert into flood_light (Name, Brand, Quantity, Detail, Unit, Color, Material, Image) values(?,?,?,?,?,?,?,?) on duplicate key update set Name …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Insert with Update

    Hello to all, I am trying to create an admin panel so that admin can insert data into database. This is my code <?php include("connection.php"); if (isset($_POST['submit'])) { $name = …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in oracle error

    Invalid column name `phone number`. You can use space separated column name inside bockqoutes e.g. `CREATE TABLE BUILDING(bname VarChar2(30) PRIMARY KEY, address VarChar2(30), "phone number" Number(15));`
  • Member Avatar for AndrisP
    AndrisP

    Began Watching oracle error

    CREATE TABLE BUILDING(bname VarChar2(30) PRIMARY KEY, address VarChar2(30), phone number Number(15)); i write this code in sql command of oracle application express. but there is a error ORA-00907: missing right …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Allowing some directives with .htaccess

    Directive `AllowOverride All` need set to default config file
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Allowing some directives with .htaccess

    By default `.htaccess` is disabled. To use it set directive `AllowOverride All`
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Allowing some directives with .htaccess

    You can set directive in to the file `/etc/apache2/sites-available/000-default.conf` e.g. <Directory /path/to/your/localhost/public_html/> Options FollowSymLinks MultiViews Includes Indexes AllowOverride All Require all granted </Directory> (reload apache) if missing file `index.php` (or …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Allowing some directives with .htaccess

    About `allow` and `deny` read this https://httpd.apache.org/docs/2.2/mod/mod_authz_host.html
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Allowing some directives with .htaccess

    I have to do this: "the .htaccess file should allow the following directives" `DirectoryIndex` `Deny` `Allow` `Options` `Order` `AddHandler` `RewriteEngine` `RewriteBase` `RewriteCond` `RewriteRule` But I have no clue where to …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in php login issue

    1. Password should be crypted! 2. Use `filter_input()` function e.g. `$username = filter_input(INPUT_POST, "username");` 3. Check `if($username !== NULL && $password !== NULL){ ... }` before query 4. Do not …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching php login issue

    Hello to all, I am facing an issue with login form. Everything is correct, but.. <?php session_start(); include("config.php"); $username = $_POST["username"]; $password = $_POST["password"]; $sql = "SELECT * FROM register …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Select Case Query Not Working

    Do you really want to multiply the date difference by salary? Everything else can be done more extensively without subqueries and without `case when` using simple `IFNULL()` function SELECT EmpId, …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Select Case Query Not Working

    SELECT CASE WHEN (Employees.End_Date is null) THEN select EmpId, Emp_Name, Salary , Start_date , End_date ,DATEDIFF(DATE_ADD(Start_Date, INTERVAL 30 DAY), Start_Date) * Salary/30 as 'Total_Salary' from Employees ELSE Select EmpId, Emp_Name, …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Computer Language

    Python will teach you to write a readable code also because the program code syntax is based on deviations
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Computer Language

    What programing language should I learn first? I'm a beginner B.Tec 1st Year student.
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in SSD not mounting

    It's a dual boot PC? If yes maybe Windows system is sleep or hybrid sleep not succesfully shut down.
  • Member Avatar for AndrisP
    AndrisP

    Began Watching SSD not mounting

    I recently created a post thinking I had blown up my bootloader but I've actually narrowed the problem down to the SSD on which my home directory is mounted. The …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in php to insert into db using checkbox

    Querie (line 13) is out of `foreach` (lines 9-11)
  • Member Avatar for AndrisP
    AndrisP

    Began Watching php to insert into db using checkbox

    Hi I have the following form at [http://test.genealogyresearchassistance.co.uk/newLinks.php](http://test.genealogyresearchassistance.co.uk/newLinks.php) The code is <form id="add" action="add.php" method="get"> <label for="name" id="name">Name of site</label> <input type="text" name="name" required="yes"><br/> <label for="link" id="link">Link of site</label> <input …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in pdo normalize mysql table

    I think that so many subqueries will make slow SQL execution. Use left join and build PHP object from query results.
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in pdo normalize mysql table

    It seems ok. Save it in the DB as view. I'm notice in this select you can not order shops and can not order devices. Can order by employee name …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in pdo normalize mysql table

    You need set foreign key (on delete cascade) constraints also. It will prevent to zombie entries in the table “employees_shops”.
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in pdo normalize mysql table

    If you can not set unique names for employees edit procedure - change input parameter `p_name varchar` to `p_id int` and pass "id" directly
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in pdo normalize mysql table

    Yes unique key constraint will not allow duplicate entries when you call procedure `edit_relation` many times with the same input parameters (`input ignore into .....`). Table `employees` field `name` and …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in sql server

    MySQL: select date_format(now(), '%d-%m-%Y'); PostgreSQL: select to_char(now(), 'dd-mm-yyyy'); OracleSQL: select to_char(sysdate, 'dd-mm-yyyy') from dual; Clause `from dual` in Oracle is required, in MySQL is optional, in PG SQL not usable …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching sql server

    Hi, I am new with sql server. I want my date formate like dd-mm-yyyy.. but i could not able to do so. please help me and give me proper syntex …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Register Values in php

    Please do not write duplicate topics https://www.daniweb.com/programming/web-development/threads/508505/insert-values-in-database
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in pdo normalize mysql table

    You can create stored procedure for convenient use add or delete relations in the table `shop_employees` eg delimiter $$ create procedure `edit_relation`(in p_name varchar(9), in p_shop varchar(9), in p_add boolean) …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Register Values in php

    Do not use table name in apostrophes! Table name can be in the backticks.
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Register Values in php

    Hello to all, I am facing an issue in registering values into database through php. Many times i have done the same but i don't know why i am unable …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in check if a record exists then if it does update table if it doesn't insert

    Show your table creat SQL code. I do not know what primary or unique keys is set to the table. Example if unique key is person_id INSERT INTO ".$DB_TABLE." (`person_id`, …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching check if a record exists then if it does update table if it doesn't insert

    so my newest problem! i have a save button and that save button already has the insert into query and working fine now what i wanna do is when the …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in pdo normalize mysql table

    select e.`name`, ( select group_concat( (select s.`shop` from `shops` s where s.`shop_id` = t.`shop_id`) separator ' ') from `shop_employees` t where t.`employee_id` = e.`id` ) `shop list` from `employees` e;
  • Member Avatar for AndrisP
    AndrisP

    Began Watching pdo normalize mysql table

    I am rather new to Normalization. I understand the concept of how it organizes the tables but I fail to see how I can use the data to show up …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Mask out (punch out) SVG shapes

    Elements within <defs> is not visible - need linked. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 200 200"> <defs> <mask id="chain"> …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Mask out (punch out) SVG shapes

    Black by default

The End.