10,940 Topics

Member Avatar for
Member Avatar for rgkrish183

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> …

Member Avatar for peter_budo
0
403
Member Avatar for garwil

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 …

Member Avatar for garwil
0
254
Member Avatar for RainaAnja

<?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']} …

Member Avatar for matrixdevuk
0
198
Member Avatar for haymen.roth.3

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. …

Member Avatar for haymen.roth.3
0
208
Member Avatar for <M/>

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?

Member Avatar for <M/>
0
180
Member Avatar for patk570

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; …

Member Avatar for patk570
0
159
Member Avatar for kumiyare

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. …

Member Avatar for jstfsklh211
0
247
Member Avatar for juslai

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 …

Member Avatar for jstfsklh211
0
659
Member Avatar for Iikeloa

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.?

Member Avatar for Iikeloa
0
140
Member Avatar for diafol

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 …

Member Avatar for diafol
2
289
Member Avatar for Hayezb

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 …

Member Avatar for diafol
0
2K
Member Avatar for asker54

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 …

Member Avatar for asker54
0
284
Member Avatar for accra

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 …

Member Avatar for OsaMasw
0
264
Member Avatar for blueguy777

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` …

Member Avatar for urtrivedi
0
123
Member Avatar for mpc123

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 …

Member Avatar for Ewald Horn
0
234
Member Avatar for sultankhan

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']; …

Member Avatar for sultankhan
0
2K
Member Avatar for rgkrish183
Member Avatar for rpv_sen

[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 = …

Member Avatar for monalia
0
4K
Member Avatar for eddstyson

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 …

Member Avatar for eddstyson
0
244
Member Avatar for duttydea

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 …

Member Avatar for diafol
0
2K
Member Avatar for Yanny_1

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

Member Avatar for theHop
0
138
Member Avatar for jacob21

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.

Member Avatar for pritaeas
0
102
Member Avatar for joshl_1995

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? …

Member Avatar for joshl_1995
0
257
Member Avatar for mrhankey

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 …

Member Avatar for rch1231
0
111
Member Avatar for Transcendent

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

Member Avatar for pritaeas
0
123
Member Avatar for mattyd

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, …

Member Avatar for mattyd
0
270
Member Avatar for nawazsj

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 …

Member Avatar for pritaeas
0
314
Member Avatar for davy_yg

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 …

Member Avatar for davy_yg
0
233
Member Avatar for jacob21

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 …

Member Avatar for jacob21
0
161
Member Avatar for LRNPHP

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 == …

Member Avatar for LRNPHP
0
440

The End.