10,940 Topics

Member Avatar for
Member Avatar for jay.barnes

Hi all I'm trying to set my mysqli connection to my database as outlined in http://php.net/manual/en/mysqli.quickstart.connections.php , with one difference - I'm trying to put my connection parameters in an include file outside of my root folder, to try to secure my DB password. $mysqli = new mysqli("DBServer", "DBUsername", "DBPassword", …

Member Avatar for jay.barnes
0
264
Member Avatar for SoMa_2

I'm trying to do something like this $level=0; if($a=="x"){ $level=1; } Else{ $level=2;} How I can use the new value of $level outside the scope of IF Statement

Member Avatar for cereal
0
151
Member Avatar for yaginuk

Hi, i have had made in the past a php file to download a supplier list in xml format, import it to a temp database with a datestamp then the file will check to see if product exists or not, has been removed from the file since last time or …

Member Avatar for diafol
0
240
Member Avatar for savedlema

Hi all! I have just developed an application on VB.NET with mysql. I then need to deploy this to clients workstations. The plan is to install mysql server on one computer and have all other clients connect to this. What do I need to install on the server and what …

Member Avatar for rubberman
0
532
Member Avatar for Nguyen_4

I import excel file and show on datagridview I want insert all row datagridview to mysql. But i receive error: Incorrect date value:'11/14/1991 12:00:00 AM' for column 'Ngaysinh at row 1. Mysql : i using date : yyyy/mm/dd datagridview show : mm/dd/yyyy. i don't know error: '12:00:00AM ' ???? column …

Member Avatar for JerrimePatient
0
1K
Member Avatar for vivosmith

While it is not showing any errors that I can see, my input from an HTML form is not working. I copied part of the script from Visual QuickPro Guide book on PHP 6 and MYSQL 5. I only had one input , so I modified the script for my …

Member Avatar for vivosmith
0
348
Member Avatar for SoMa_2

I have images generated by while loop php based on how many course user have when user press on one of those images it will send him to that course page but all images send to one course page this my php code in** home page ** <?php $con=mysqli_connect("localhost","FYP","123","FYP"); $sql= …

Member Avatar for diafol
0
2K
Member Avatar for Simon180

I have a small issue with following code am inserting a new room into mysql using query and then I want it to auto join the room once its made but the problem is when room is in process of being made it will call the GoTo procedure and it …

Member Avatar for Simon180
0
282
Member Avatar for phoenix254

Hi, i want to change format of date . This code i add in my register page.... if(!empty($_POST['dob'])&& !empty($_POST['mob'])&& !empty($_POST['yob'])) { $yob = mysqli_real_escape_string($con,$_POST['yob']); $mob = mysqli_real_escape_string($con,$_POST['mob']); $dob= mysqli_real_escape_string($con,$_POST['dob']); $date = mysqli_real_escape_string($con,"$yob-$mob-$mob"); $addtothedb="INSERT INTO login (Dateofbirth) VALUES ('". $date . "')"; $result=mysqli_query($con,$addtothedb); and when i get back data from db …

Member Avatar for cereal
0
416
Member Avatar for mbarandao

Hello, I was wondering if the following mysql query can be constructed in a much more efficient way? SELECT distinct(cr.email), m.fname, m.lname, m.email, (SELECT count(*) FROM campaignRecipts where email=cr.email )as ttlsent, (SELECT count(received) FROM campaignRecipts where received='yes' and email=cr.email )as ttlreceived, ((SELECT count(received) FROM campaignRecipts where received='yes' and email=cr.email )/(SELECT …

Member Avatar for mbarandao
0
357
Member Avatar for Manoj_16

Using the below code i am getting the data from database(mysql) and displaying it in the textbox that is in the form of table(textbox inside the table data). Now I can edit the data(td) on browser(table) but the problem is updating it to database upon changing( onChange option ) data …

Member Avatar for lps
0
3K
Member Avatar for punji

hello PHP tycoons, i beg for help in giving me a way forward to write php script which will solve the problem i'm facing now. currently i'm developing basic student information system but in php knowledge i'm not that good, thus why i'm asking for help.so what i want to …

Member Avatar for lps
0
325
Member Avatar for logicaweb

I'm trying to make average consumption of fuel in my db. But I do not know how to do it. This is an little explanation: I have 2 tables: Tabe CONSUM: ID CARID LI KM DATETIME ------------------------------------------------ 6 9 70.17 174857 2015-02-10 10:58:51 5 5 51.00 154785 2015-02-09 19:11:19 4 …

Member Avatar for kalxas
0
241
Member Avatar for AntonyRayan

Hi, How to calculate no of days working of an employee and no of days absent in a current month.

Member Avatar for kalxas
0
373
Member Avatar for ramsiva

I am getting id's 3 times. count will be 3 but i am getting 9. i dont know where i did mistake. any body help me $result = mysql_query("SELECT * FROM candidate where user_id ='$username' and password='$password' and status='0' " ); $num=mysql_num_rows($result); if($num>0) { $row1=mysql_fetch_array($result); $cand_id=$row1['cand_id']; $f_mobile=$row1['f_mobile']; $d2=mysql_query("select * from …

Member Avatar for kalxas
0
179
Member Avatar for SoMa_2

I'm trying to create a webpage to help teacher determine CLO and PLO for exam questions First user will type the keyword in text box and select the chapter CLO() function will start the AJAX the result should be a CLO Number in CLO column and PLO options in PLO …

Member Avatar for asgs
0
358
Member Avatar for uchejava

I need your suggestion on something. I want to display a 'message notification' on my menu bar. I want it to be like the Facebook message notification. When I have a new message, '1' should show close to the message menu e.g. 'Message 1' (I can use CSS to style …

Member Avatar for Eagle.Avik
0
204
Member Avatar for rchawdhari

Hi all, Is it possible to ignore temporary tables in mysqlbinlog file for replication.

Member Avatar for AleMonteiro
0
176
Member Avatar for MarkDbro

I have a question about inserting images into a product page. I have 5 images (saved as longblobs in my products table) and would like to put them in my table like the id, name, quantity and price.... any idea of how i would do this? I have this so …

Member Avatar for MarkDbro
0
1K
Member Avatar for phoenix254

$result = mysqli_query($con,$addtothedb); $cur = "USERS/"; echo $des = $cur.$email.'/'; if($result){ if ( mkdir($des,0777) ) { //http://pastebin.com/7J0BM5fD echo "<br/>"; echo "<br/>"; echo $file_name = $_FILES['file']['name']= 'mfix.png'; echo "<br/>"; echo "<br/>"; echo $file_tmp =$_FILES['file']['tmp_name']= 'mfix.png'; echo "<br/>"; echo "<br/>"; move_uploaded_file($file_tmp, $des.$mfix); echo "<img src='<?php echo $mfix ;?>' alt='Image' style='width:100px;height:100px'>"; /*echo "<img …

Member Avatar for phoenix254
-1
197
Member Avatar for anejose

i am new to php i need to create php code for automate monthly wise uploads files 2014 under sub category like months january(2014) under this uploads are grouped january month for example http://www.journalijdr.com/past-issue

Member Avatar for AleMonteiro
0
105
Member Avatar for phoenix254

<?php $con=mysqli_connect("localhost","root","","uplod"); if (mysqli_connect_error()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } else{ echo work $sql ="UPDATE tea SET name = ' 8req' WHERE id = '3 ' "or die ("cant update" . mysql_error()); if($sql) echo"working"; } ?> Who can tell me which is error is the …

Member Avatar for phoenix254
0
221
Member Avatar for Kcachilove

Hello I have an SQL query that i want to concatenate the fields and display it in a way that those concatenated fields will be displayed first row will have 4 columns,second row will also have 4 columns....etc. for instance the query `SELECT imageurl, caption, template FROM template; The Result …

Member Avatar for anejose
0
1K
Member Avatar for Andrew de Beer

Hi All I use MS Access to import information from Excel, check for duplicates and post it to an Access data table. The amount of data is making this process extremely slow. I am attempting to move the data tables to MySQL and then running a Stored Procedure to do …

Member Avatar for DaveAmour
0
173
Member Avatar for rouse

This is a novice question and I hope some one can help. So far I have written 2 forms and a 3rd file. The first pulls every record from a table where the user can choose to modify a particular record. On the second form the user modifies the record …

Member Avatar for rouse
0
262
Member Avatar for rouse

I’m trying to patch a routine and I finally found the problem. I am given the following string: [code] $query = "SELECT title, DATE_FORMAT(event_date, '%Y-%c-%e') AS event_date FROM $dbTable WHERE event_date LIKE '$year-$month%'"; [/code] In the month variable at the end, for the months January through September I am returned …

Member Avatar for rouse
0
316
Member Avatar for rouse

I am looking for help to write a query. I have a database with an ID a Date_Field and a Description. I want to find out two things What Date_Field and Description and Description are the same? {duplicate records} [code] SELECT * FROM TIME_TABLE t1 WHERE EXISTS ( SELECT * …

Member Avatar for rouse
0
170
Member Avatar for rouse

I the found the link below when I was researching how to get a random record for a database. This article is about speed in retrieving a random record and I found in my test that speediest solution brought about the most duplicates. [url]http://akinas.com/pages/en/blog/mysql_random_row/[/url] I am hoping some one has …

Member Avatar for rouse
0
99
Member Avatar for UK-1991

I have created a vendors page where I want to show how many vendors exist in the database. I have succcssfully done but main problem is that how do i show that which vendor contains how many products There are 2 tables I have created 1 is products 2nd is …

Member Avatar for UK-1991
0
219
Member Avatar for James_43

Hi all, I am trying to populate text on my website from data stored in a MySQL database. I have this script before the <head> of my HTML to establish the connection: <?php $username = "USERNAME"; $password = "PASSWORD"; $hostname = "127.0.0.1:3306"; //connection to the database $dbhandle = mysql_connect($hostname, $username, …

Member Avatar for jj.dcruz
0
300

The End.