10,940 Topics

Member Avatar for
Member Avatar for Shabbir_1

this is my code $sql = "SELECT * FROM `sale_history` WHERE `date` BETWEEN :fromdate AND :todate"; $stmt = $PDO->prepare($sql); $stmt->bindParam(':fromdate', $_POST['fromdate'], PDO::PARAM_STR); $stmt->bindParam(':todate', $_POST['todate'], PDO::PARAM_STR); $stmt->execute(); $total = $stmt->rowCount(); while ($row = $stmt->fetchObject()) { echo "$row->date"; echo "$row->product"; echo "$row->username"; echo "$row->quantity"; } but its not working, where is the …

Member Avatar for diafol
0
3K
Member Avatar for AntonyRayan

HI, In a page I load table in while loop with time duration calculation for multiple times. I want to display time difference in their respective rows. Here I included my code. <?php $a = mysql_query("SELECT * FROM user")or die(mysql_error()); $a_count = mysql_num_rows($a); if($a_count > 0) { ?> <table border="1" …

Member Avatar for diafol
0
269
Member Avatar for shany0786

I have a strange problem here is code snippet for form having bootstrap tab when after filling all form fields i submit the form no error or form fileds are posted,there is something wrong with my html however my validations and other backend code is working for other form but …

Member Avatar for diafol
0
10K
Member Avatar for Jatinder_1

When I login same script works for first user but for other user, it gives error in connection. More over i want to fetch data from database Main File is <?php include_once("../init.php"); validation_check($_SESSION['SID'],MEM_HOME_ADMIN); $msg=''; $dir ='../'.USER_PIC; $sId = $_SESSION['SID']; $query = mysql_query("select * from user WHERE user = ".$sId) or …

Member Avatar for pritaeas
0
193
Member Avatar for k_manimuthu

Hi All, I have a sql query i am trying to get the count of how rows it returned. select a.field1, b.field2, c.field2 from table1 as a, table2 as b, table2 as c where a.field1=b.field1 Considered the above query return 9 rows. I want to get count of '9' in …

Member Avatar for k_manimuthu
0
286
Member Avatar for jaime.bentez

I received a database I need to restore on my local machine. The database is MySQL off a Linux box, is it possible to mount these files similar to how you would a .mdb file on a MSSQL Server? I am looking to mount them on my Windows based version …

Member Avatar for jaime.bentez
1
1K
Member Avatar for Syed_10

I've asked the same Question here http://stackoverflow.com/questions/34422852/debug-assertion-failed-binary-search-tree > IM IN DESPERATE NEED OF HELP. Im working on a project, What I want is to get data from a database (MySql) and store it in a Tree. And be able to do insertion, deletion or updates on the nodes, if any …

0
122
Member Avatar for Shabbir_1

<?php if (isset ($_POST['submit'])) { try { $picture = "../images/default-picsss.png"; $sql = " INSERT INTO user (username, password, fullname, address, mobile, email, picture) VALUES (:username, :password, :fullname, :address, :mobile, :email, :picture ); INSERT INTO user_balance (username) VALUE (:username); "; $stmt = $PDO->prepare($sql); $stmt->bindParam(':username', $_POST['username'], PDO::PARAM_STR); $stmt->bindParam(':password', $_POST['password'], PDO::PARAM_STR); $stmt->bindParam(':fullname', $_POST['fullname'], …

Member Avatar for diafol
0
196
Member Avatar for Devendra_4

Hi, I am trying to load data from mysql to angular JS. the data is huge. i.e. 50000 records.I have also set SQL_BIG_SELECTS=1 before join query execution. But i am getting following error while calling this query. Error: Internal Server Error.

0
101
Member Avatar for Yousef Altaf

I was trying and trying to get this to work as expected I got this chain drop down menu to work but the problem how can I edit or retrieve data to edit pls if you have time look at my script here on (MS oneDrive) https://onedrive.live.com/redir?resid=B6ED478A72FB6A78!33834&authkey=!AO9oNU_4snXOqH4&ithint=file%2czip the three drop …

Member Avatar for diafol
0
201
Member Avatar for AntonyRayan

Hi, I need your help for forgot password decryption. When a user registers , his password will be encrypted using md5(); and When he sign in, I will encrypt his password using MD5() and I will compare it with value already stored in to table, My problem is, If he …

Member Avatar for diafol
0
251
Member Avatar for jstfsklh211

my insert statement seems to be ignoring my unique index and adding duplicates what'd i mess up? thanks in advance Table CREATE TABLE `address` ( `address_id` int(11) NOT NULL AUTO_INCREMENT, `address_street1` varchar(100) NOT NULL, `address_street2` varchar(100) DEFAULT NULL, `address_street3` varchar(100) DEFAULT NULL, `address_city` varchar(45) NOT NULL, `address_state` char(2) DEFAULT NULL, …

Member Avatar for Teddy112
0
1K
Member Avatar for UK-1991

Hello. I have created a filter result using php but it is not properly working for me when i filter result it is not showing me up with any products <form method="POST" action="product.php?cat=<?php echo $cat; ?>"> <div class="price-box"> <h5>Price</h5> <input type="hidden" name='price_range' class="range-slider" min="0" max="600" value="23" /> </div> <div id="filters"> …

Member Avatar for diafol
0
307
Member Avatar for AntonyRayan
Member Avatar for divyasuraya

* <?php mysql_connect("localhost","root","") or die ("could not connect"); mysql_select_db("search_test") or die ("could not find db!"); //collect if(isset($_POST['search'])){ $searchq = $_POST['search']; $searchq = preg_replace("#[^0-9a-z]#i","",$searchq); $query = mysql_query("SELECT * FROM members WHERE firstname LIKE '%$searchq%' OR lastname LIKE '%$searchq%'") or die ("could not search!"); $count = mysql_num_rows($query); if ($count == 0 ) …

Member Avatar for cereal
0
236
Member Avatar for javi2015

I have a program that will connect to mysql server , now how to do for this work? What settings should I do on a mysql server?

Member Avatar for necrovore
0
177
Member Avatar for Raven_1

here is my sample code: addqtr.php <?php $quarter=$_POST['quarter']; $sql="Select * from $quarter where id=?"; $res=$db->prepare($sql); $res->execute(array($pqid)); while($rowadd = $res->fetch(PDO::FETCH_ASSOC)){ $num=$rowadd['id']; $pushup=$rowadd['pushup']; $situp=$rowadd['situp']; } ?> <form method="post" name="frmQuarter" action="saveqtr.php"> <input type="hidden" name="qid" value="<?php echo $pqid; ?>"/> <table> <tr> <td>Select Quarter</td><td>:</td> <td> <select id="quarter" name="quarter"> <option selected></option> <option value="1qtr">1st</option> <option value="2qtr">2nd</option> <option …

Member Avatar for Raven_1
0
226
Member Avatar for mexabet

I'm experiencing an issue deleting data via PHP/MySQL query. The following is the error message: Delete product category failed. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3 This is …

Member Avatar for cereal
0
778
Member Avatar for miraasir

I want to add data entered from Java GUI into mysql database and inside actionlestener I am using the following code: String s1; JTextField enterdata = new JTextField(10); s1=enterdata.getText(); PreparedStatement ps = con.prepareStatement("INSERT INTO d (name) VALUES (?)"); ps.setString(1, s1); ps.executeUpdate(); 'name' is the column in database; i am having …

Member Avatar for JamesCherrill
0
351
Member Avatar for nadiam

Hi guys. I have already installed fullcalendar successfully onto my webpage home.php <script type="text/javascript" src="js/fullcalendar.js"></script> <script type="text/javascript" src="js/fullcalendar.min.js"></script> <script> $(document).ready(function() { var date = new Date(); var d = date.getDate(); var m = date.getMonth(); var y = date.getFullYear(); $('#calendar').fullCalendar( { header: { left: 'prev,next today', center: 'title', right: 'month,basicWeek,basicDay' }, …

Member Avatar for Shilpi_1
0
13K
Member Avatar for jKidz

Hi All, I want to know wheather I can update (add new data) to a row in mysql database table without replacing existings data. Ex : There is a row that contains, ID Name City Groups 1 John Colombo gamers I want to add 'programmers' to John's Groups. ID Name …

Member Avatar for diafol
0
208
Member Avatar for Safina_1

i am trying to fetch only image from database.In database the table (post_content) have image along with description i only want image.is it possible?Keep in mind that $row['post_content'] has image and decription. <?php $sql = "select * from wp_tableposts;"; $res = mysql_query($sql); while ($row = mysql_fetch_array($res)) { echo'Post Contant:'. $row['post_content']. …

Member Avatar for Safina_1
0
643
Member Avatar for AntonyRayan

I included my mail attachment code in php But it is not working correctly, Please give me a alternate solution which works in online <?php //define the receiver of the email $to = 'demo@gmail.com'; //define the subject of the email $subject = 'Test email with attachment'; //create a boundary string. …

Member Avatar for AntonyRayan
0
315
Member Avatar for Izzah_2

Hi, Ive been follow the tutorial in the youtube . I need to upload images to my webpage but the code seem not working. It also doesnt not appear any errors from the code. Can someone please have a look at my code, please? <!-- dbase.php to connect between php …

Member Avatar for Izzah_2
0
4K
Member Avatar for AntonyRayan

Hi, It is a new for me. In a site, I have 10 to 15 menus. I want to know a user what are the menus he accessed , how many times he visited a particular menu from he logged in, and from which IP Address. How to know these …

Member Avatar for rch1231
0
131
Member Avatar for AntonyRayan

In local, mail works perfectly. But in online I got error like: SMTP->ERROR:Password not accepted from server:534-5.7.14 Please log in via your web browser 534-5.7.14 then try again. Learn more at 534-5.7.14 https://support.google.com/mail/answer/78754z190sm15009353oig-25 - gsmtp Message was not sent.mailer Error:SMTP Error:Could not connect to SMTP host.

Member Avatar for cereal
0
232
Member Avatar for angelburgos

Good day to all, Can anyone please assist a beginner in determining the best way to convert or parse the information generated by a secure GPS device? Am creating a script for tracking GPS based watches and I need to convert the output so it can be read in real …

Member Avatar for pritaeas
0
183
Member Avatar for geysa

Warning: mysqli_query() expects parameter 2 to be string, object given in E:\xampp\htdocs\cadastro\cadastrar.php on line 46 Alguem pode me ajudar? <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <title>Cadastrar</title> </head> <body> <?php include "config.php"; $nome = isset( $_POST['nome'] ) ? $_POST['nome'] : 'valor_padrao'; $sobrenome = isset( $_POST['sobrenome'] ) ? $_POST['sobrenome'] : 'valor_padrao'; …

Member Avatar for stultuske
0
369
Member Avatar for amith_ami

Hi all, I am trying to select single record from each year of last ten year. Given below is the code what I am using now. But its taking too much time to get the result. Is there any way to make it fast? $sql_cond ="SELECT Close_Price FROM (SELECT Close_price …

Member Avatar for amith_ami
0
337
Member Avatar for lewashby

I get the following in my web browser when I try to connect to my mariaDB database. `Error!: SQLSTATE[HY000] [1045] Access denied for user ''@'localhost' (using password: NO)` It also doesn't matter if I use mariaDB root or a regular users credentials, I get the same thing. The error above …

Member Avatar for lewashby
0
656

The End.