10,940 Topics
| |
this front page: Form.jsp <html> <head> <title> Data Inserting Form </title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> </head> <body> <h1>ENTER THE EMPLOYEE DETAILS</h1> <form action="./Insert.jsp" method="post"> <table cellspacing="5" cellpadding="5" border="5"> <tr> <td align="right">Employee Name:</td> <td><input type="text" name="EmployeeName"></td> </tr> <tr> <td align="right">Employee_id:</td> <td><input type="text" name="Employee_id"></td> </tr> <tr> <td align="right">Nationality:</td> <td><input type="text" name="Nationality"></td> </tr> … | |
I have an accommodation reservation system that allows managing agents to list all the properties under their control. There are various 'locations' that have a priority such as:- 'Beach Front' has priority of 1 and 'Off beach' a priority of 2 etc. Setting these are pretty much a straight forward … | |
<?php include 'connectMySql.php'; if(! $conn ) { die('Could not connect: ' . mysql_error()); } $sql = 'SELECT * FROM users '; $result = mysql_query( $sql); if(! $result) { die('Could not get data: ' . mysql_error()); } while($row = mysql_fetch_assoc($result, MYSQL_ASSOC)) { echo "ID : {$row['id']} <br> ". "USERNAME : {$row['username']} … | |
Successfully calculated TotalTime a person has worked and overtime he has done if total working time is greater than 08:00 but if not greater than it puts duration of time person has not worked in Overtime column BUT NOW overtime column should display that time in proper negative format e.g. … | |
I am creating a site and I am trying to put all the posts within a mysql database (phpmyadmin). How do i put articles/posts in the DB? | |
I am trying to do a count of all types in there(hardware and software) I thought i had the correct structure...but I guess i am wrong... $count = mysqli_query($mysqli, "SELECT COUNT(*) AS total_count FROM assets WHERE cust_id=$custID AND (asset_type='hardware' AND asset_type='software') "); echo mysqli_error($mysqli); $count = mysqli_fetch_object($count); $count = $count->total_count; … | |
I have the following query which joins 5 related tables to get the desired result set of 10 rows, I did my best to solve the issue by adding indexes and re-writing the query in many different ways but I ended up either unexpected result or a very slow query. … | |
I want to be able to insert the data from a range function into mysql table the range values comes from 2 textfields that are user inputted, for example the user inputs 1 and 50 the range function generates numbers from 1 to 50 in an array, my problem is … | |
Hi I"m sorry that there is no code, it's just a question in my mind .. How can I sort the request results as rows.In every row 4 results then the next row 4 results and so on.? | |
| While extending a mysqli class, I ran into an issue with binding parameters. I've read that db names and table names should not be used as parameters, but while I was pondering this statement... SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = '$dbname' I thought, as the db name is a … |
Hello! I'm needing some help integrating HighCharts into my CodeIgniter application and getting data from my MySQL database! I've followed a YouTube video on actually integrating HighCharts and it was extremely straightforward. However, that method included a hardcoded array and I'm needing to generate an array from data stored in … | |
While learning php I found this common statement $add_tel_sql = "INSERT INTO telephone (master_id, date_added, date_modified, tel_number, type) VALUES ('".$master_id."', now(), now(), '".$safe_tel_number."', '".$_POST['tel_type']."')"; What I do not understand why in the '".$master_id."' we are using the " and also the dot. why we do not only use $master_id without … | |
I'm retriving a youtube link from mysql db with this code <?php //echo $embed; $yt_url=$embed; function get_youtube_id_from_url($url) { if (stristr($url,'youtu.be/')) { preg_match('/(https|http):\/\/(.*?)\/([a-zA-Z0-9_]{11})/i', $url, $final_ID);return $final_ID[3]; } else { preg_match('/(https|http):\/\/(.*?)\/(embed\/|watch\?v=|(.*?)&v=|v\/|e\/|.+\/|watch.*v=|)([a-zA-Z0-9_]{11})/i', $url, $IDD); return $IDD[5]; } } $variable= get_youtube_id_from_url($yt_url); ?> and extracting the id part of the link and placing it in … | |
i am trying to generate pdf file using fpdf selecting data from two different tables i.e. table custreg and table slabpay, but getting MySQL error: "Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in D:\inetpub\vhosts\kisan.net\httpdocs\greengold\exportpdf.php on line 124". Code: $strSQL = "SELECT custreg.mobno1, slabpay.ac_no, slabpay.cust_name, slabpay.install_no, GROUP_CONCAT(`slabpay.install_amt` … | |
HI Hope somebody can help. My query updates a colomn in tab1 from a row in tab2 but only if a colomn in tab1 is equal to that of a row in tab2. tab 1 has 360000 rows tab 2 has 477 rows The update query runs for ages and … | |
i have store an image into my database. but i am unable to display the image what i have done till now is under.... any help will be appreciated. thanks in advance! <? $query="SELECT * from testimonial"; $ret = mysqli_query($mysql,$query); if (isset($ret) && $ret->num_rows>0) { while($row=mysqli_fetch_array($ret)) { $body=$row['body']; $name=$row['name']; $image=$row['img']; … | |
ClassNotFoundException:com.mysql.jdbc.Driver | |
[CODE]Hi Friends, I have written a code with some example script for generating report in PDF with PHP and MYSQL. But i am unable to fetch the data from my table. So Please help me to solve this issue. Thanks <?php $today=date('Y-m-d'); $hostname = "localhost"; $database = "bdname"; $username = … | |
i have managed to code this CSV file and it is working well..the only problem i am getting is the variable error on the form..i get this error ...Notice: Undefined variable: data in C:\xampp\htdocs\helper.php(527) : runtime-created function on line 22 how do i resolve the error? this this my sample … | |
Hi all, I have an array: [CODE]<?php $product_id = $_GET[id]; //the product id from the URL $action = $_GET[action]; //the action from the URL //if there is an product_id and that product_id doesn't exist display an error message if($product_id && !productExists($product_id)) { die("Error. Product Doesn't Exist"); } switch($action) { //decide … | |
Hi! Anyone can help me about my problem on HOW TO UPDATE TABLE USING THE CONTENTS FROM ANOTHER TABLE? Thank you in advance for those who can help me. Anyway, I'm using VB.Net 2010 I hope you guys can help | |
Hi, I have 5 tables..a.b,c,d,e While doing equi join : 1)a.id=b.id, b.id=c.id, c.id=d.id, d.id=e.id a.id=c.id, a.id=d.id b.id=d.id How internally equi join works.should i need all PK to Join Could you suggest me some tutorial which shows how internally works. | |
Hello Community, I have recently been having a big of a look into connecting to a database using PDO but I'm not too sure what I should stick with, the normal way to connect to a MySql database or should I start using PDO. What would be better to use? … | |
hi there, looking to get some help. i have created a view which pulls together from different product tables a review date. the thing is that a client could have review dates for the same product and i need it to only display the most recent review date. i tried … | |
If I had this: <html> <body> <form action="welcome.php" method="post"> Name: <input type="text" name="name"><br> E-mail: <input type="text" name="email"><br> <input type="submit"> </form> </body> </html> HOW DO I TAKE WHAT SOME TYPE INTO MYSQL. Do I create a table first ect. Examples pleases | |
I am using mysql_fetch_assoc to retrieve and display an array; This is what I recieve upon loading the page: *Warning: mysql_fetch_assoc() expects parameter 1 to be resource* I have researched it and do not understand it. **Snippet* while ($row = mysql_fetch_assoc('$result')) { echo $row["emp_name"]; echo $row["emp address"]; } Thank you, … | |
please help me to display the multiple image from mysql this id my file for uploading multiple image $valid_formats = array("jpg", "jpeg", "png", "gif", "zip", "bmp", "pdf", "doc", "docx"); $max_file_size = 100000*100; //100 kb $path = "uploads/"; // Upload directory $count = 0; extract($_REQUEST); // Loop $_FILES to execute all … | |
Hallo, I am trying to fix my mysql search query: $data = mysql_query("SELECT * FROM static_content WHERE upper(image) or upper(title) or upper(content) LIKE'%$find%'"); Please help me to fix it. Is it correct? I mean where column image (change to upper case) or column title (change to upper case) or column … | |
Hi, below queries gives two rows like category_name high_value_complaints category_name high_value_duplicate_complaints I am trying to merge both queries category_name high_value_complaints high_value_duplicate_complaints I tried to join both tables but its giving category_name high_value_complaints category_name high_value_duplicate_complaints Need suggestions select category_name, count(distinct complaint3.id ) as high_value_complaints from complaint_category,assignment3,user3,complaint3_details, complaint3,complaint_tag ct where complaint3.complaint_category_id=complaint_category.id and … | |
Hi All, I'm battling to get this query to work. I have a select form that allows user to select dates. When he submits it it needs to remove weekends from the request. $DateStart='2013-09-01'; $DateStart='2013-09-05'; $DateSTR=strtotime($DateStart); $DateSTO=strtotime($DateStop); for($i=$DateSTR; $i<=$DateSTO; $i++){ $NewDate=strtotime($i); $DateCalc=date('D', $NewDate); $TotalCount++; if($DateCalc == 'Sat' || $DateCalc == … |
The End.