2,570 Topics

Member Avatar for
Member Avatar for Víctor_19

I need to insert an imagen into a SQL Server Database and i need to do it using jsp, but i don't know how to do it. Someone can teach me the best way to do that?

Member Avatar for pty
0
476
Member Avatar for lester_2

<?php $db = new Db(); $mysqli = Db::$_mysqli; if (isset($_POST['name'])) { $name = escape($_POST['name']); $email = escape($_POST['email']); $phone = escape($_POST['phone']); $password = escape($_POST['password']); $result = array(); /*check email is unique*/ $email_num = $db->GetNum("user","email='$email'"); if ($email_num == 0) { /*insert into database*/ $md5password = md5($password); $insert = $db->Insert("user","'','$name','$email','$phone','$md5password'"); /*success*/ if ($insert) …

Member Avatar for lester_2
0
9K
Member Avatar for lester_2

This the code in products <?php require_once("inc/header.php"); require_once("inc/navbar.php"); /* if user is logged in then only allow the user to view the page */ if (!isset($_SESSION['id'])){ echo "<h1 class='text-center text-upper text-bs-primary'>please login to view your cart <a class='text-black' href='login.php'>Login</a></h1>"; exit(); } else{ $user_id = $_SESSION['id']; } $carts = $db->FetchAll("*","cart","user_id='$user_id' AND …

0
304
Member Avatar for Mike Bishop

When i run the statement below i am getting a number of xxx.xxxx can anyone help me change this to two DP? (SELECT sum(oht_net) FROM order_header_total JOIN order_header ON oh_id = oht_oh_id WHERE oh_cd_id = cd_id AND oh_sot_id = 1 AND DATEPART(yyyy, oh_datetime) = (SELECT DATEPART(yyyy, GETDATE()) -1))

Member Avatar for Vijay_32
0
258
Member Avatar for JModak

automatically duplicate rows in sql server 2008 r2 select query i have two table name 1) tbl_Stock_Journal 2) tbl_Stock_Journal_Details i run a select query with where condition i have 5 data in table1 and in table 2 have 3 data when i run the query result is showing 15 row …

Member Avatar for pty
0
649
Member Avatar for jaimin4829

we r trying to insert date from datetime picker into mssqlserver 2005 but it also enter defult time(00:00) with it in database. using we want only date... [CODE]& xyzdtp.value.date &[/CODE]

Member Avatar for uzma_2
0
27K
Member Avatar for davy_yg

Hello, One type of SQLIA is UNION Query and I still do not completely understand what is the point. SELECT Name, Address FROM Users WHERE Id=$id by injecting the following- Id value: $id=1 UNION ALL SELECT creditCardNumber,1 FROM CreditCarTable. We will have the following query: - SELECT Name, Address FROM …

Member Avatar for pty
0
447
Member Avatar for davy_yg

Hello, I am trying to understand prepared statement and what it does. https://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet#Defense_Option_1:_Prepared_Statements_.28Parameterized_Queries.29 "Prepared statements ensure that an attacker is not able to change the intent of a query, even if SQL commands are inserted by an attacker. In the safe example below, if an attacker were to enter the …

Member Avatar for rproffitt
0
461
Member Avatar for Carlos_18

I am trying to select all rows from all tables in the database when a column equal a given name. I have like many tables with same structure and columns. I have written this piece of code but it throws an error. SELECT GROUP_CONCAT(qry SEPARATOR ' UNION ') INTO @sql …

Member Avatar for White_4
0
12K
Member Avatar for davy_yg

Hello, I am trying to prevent SQL Injection on Codeigniter. I am reading this link: https://www.roytuts.com/prevent-sql-injection-in-codeigniter/ I do not understand what is the purpose of Escaping Queries, Query Binding and Active Record. Thanks in advance.

Member Avatar for davy_yg
0
495
Member Avatar for davy_yg

Hello, I am planning to do my Thesis on SQLIA and now I am trying to understand something about SQLrand. SQLrand - a system for preventing SQLIA against web servers. The main intuition is that by using a randomized SQL query language, specific to a particular CGI application, it is …

Member Avatar for davy_yg
0
496
Member Avatar for josh_7

Hey everyone i am just asking for a little bit off help if thats fine how can i make 11 fetch scripts into 1 script please [database ](https://i.imgur.com/BTGQF1P.png) i like to make this menu to display the coins i know you can do it but i dont know how since …

0
351
Member Avatar for Robert_79

Hi I am struggling with some code and was wondering any someone could please help me. My php skills are VERY limited and only get stuff done by reading forums like this and watching YouTube videos :-[. I am enjoying learning so that is why I am sticking with it …

Member Avatar for alan.davies
0
452
Member Avatar for Hamsterking

hello hope you all are going well, so my vacation is comming and i was wondering whta if i did a big project or small project, how hard is it to make my own multivendor website like amazon, i would like to do everything like the code in php, the …

Member Avatar for overwraith
0
553
Member Avatar for overwraith

This is surprisingly difficult. Consider it a snippet. Deletes all tables from a sql server schema. Useful for those times on your dev machine where you need to tear down all the cruft that has built up on your server due to refactoring of object relationally mapped tables. --Author: Cameron …

Member Avatar for overwraith
1
479
Member Avatar for Amaina

I have been cracking my head on this mater in the past couple of days. I am faced with a situaton where i need to write a MySQL equivalent of PHP code to loop through sql select results. The Php code looks like this $query = "SELECT pubid, author FROM …

Member Avatar for flashx4u
0
19K
Member Avatar for anitg

I have two tables like below tb1 Date Cr Dr 2018-04-29 100 50 2018-04-30 0 150 2018-05-01 250 100 2018-05-02 150 100 2018-06-10 300 250 2018-06-11 0 50 tb2 Date Cr 2018-05-01 350 2018-05-02 250 2018-06-10 300 2018-06-11 100 2018-06-15 200 2018-06-18 100 I need the following Result Apr May …

Member Avatar for flashx4u
0
551
Member Avatar for savedlema

Greetings! I got a mysql database "backup" that someone made and I have to use it, trying to get a website back online. Its a Joomla web database. The person gave me a file "database.txt" (not database.sql) which opens with Notepad. Trying to "import" in phpmyadmin does not work and …

Member Avatar for Daniel_87
0
751
Member Avatar for jeffersonalomia

Hi I need your help with regards on my trigger in sql server update. Want I wanted to do is to update the existing record in my database and then fire this trigger: USE [DB004] ALTER trigger [dbo].[trg_Updt_Item_Code] ON [DB004].[dbo].[RMIS_Item_Master_Ref] FOR UPDATE AS declare @trgDT as datetime declare @trgUser as …

0
228
Member Avatar for dongtrien

For example, you can order dishes on handheld devices that run on your Iphone, Androi, winphone, restaurant, coffee shop, and so on. Any programming language that runs on the above devices, for example simple you have to share yourself with.

Member Avatar for GrimJack
0
277
Member Avatar for Akinjide

I'm developing an online shopping website using HTML, CSS and Bootstrap. I just got stuck. * How do I create a responsive shopping cart that adds up all the shopping items/products and gives a full details and total price of items bought at checkout? * How do I access the …

Member Avatar for Akinjide
0
464
Member Avatar for Cara_1

I want to view records based on the selected drop down value so I used sql query with WHERE clause. When I echo that query, it is fetching the drop down value which I selects but it isn't showing me the records in the table. When I give the values …

Member Avatar for rproffitt
0
335
Member Avatar for afaaro

Hi I am struggling how to list all the permissions and with checkboxes. if anyone can help me with it this is the code echo "<table cellpadding='0' cellspacing='0' width='100%' class='table table-bordered'>"; echo "<tr>"; echo "<th>PERMISSION</th>"; foreach($user_groups->rows as $row) { echo "<th class='checkbox'>".$row['title']."</th>"; } echo "</tr>"; $users_permission_query = $this->db->query("SELECT * FROM …

Member Avatar for jstfsklh211
0
2K
Member Avatar for davy_yg

Hello, Can anyone help me check if this SQL Injection Vulnerability Scan is FREE : https://suip.biz/?act=sqlmap And is the report truly shows whether the website is vulnerable to SQL Injection or truly save. This is the report example: ___ __H__ ___ ___["]_____ ___ ___ {1.2.3#stable} |_ -| . ['] | …

Member Avatar for rproffitt
0
2K
Member Avatar for Haripriya_1

hello i have oracle database 10g as my sql server. i didnt use it for over a year and now when i open it the page just closes without any warning or error after entering the username and password. i reinstalled it and the problem is still there. i can't …

Member Avatar for rproffitt
0
267
Member Avatar for Kalyan_3

Hi, I have a SQL Server (RSQL) and a SSAS Server(RSSAS). RSQL has a linked server to RSSAS, naming [LinkedCube] Here is a screenshot of my Linked Server Properties I use SSMS to connect to RSQL and then run a query that returns data from SSAS using linked server. The …

0
612
Member Avatar for muhd

Hello, i success display all the record when the button clicked <html> <head lang="en"> <meta charset="UTF-8"> <link type="text/css" rel="stylesheet" href="bootstrap-3.2.0-dist\css\bootstrap.css"> <!--css file link in bootstrap folder--> <title>View Users</title> </head> <style> .login-panel { margin-top: 150px; } .table { margin-top: 50px; } </style> <body> <div class="table-scrol"> <h1 align="center">All the Users</h1> <div class="table-responsive"><!--this …

Member Avatar for muhd
0
498
Member Avatar for muhd

I have 2 user which is officer and admin. The officer fill in the form. Admin will open the form, see details of officer and fill his detail. The problem is i success output all the information fill by the officer but when the admin fill the data not in …

Member Avatar for t_thakar
0
426
Member Avatar for fatima_7

I am a beginner in this field and I have some mistakes in ((codes)) who can tell me what my mistakes. Physical model (1) Employee (SSN, Salary, Phone) CREATE TABLE Employee (SSN integer PRIMRY KEY, Salary integer, phone integer); Department(DNO, dname, Budget, ssn_employee) CREATE TABLE Department(DNO integer, dname varchar(10 )Budget …

Member Avatar for john_111
0
617
Member Avatar for Ciarán_1

Hello, my code at the minute fetches a record and splits it up into a tuple, this is so each individual element can be displayed in an entry. I am now trying to create a feature which reads what is in the entrybox and updates the record in the database. …

0
265

The End.