7,368 Topics
|
|
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= … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
Hi, How to calculate no of days working of an employee and no of days absent in a current month. |
|
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 … |
|
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 … |
|
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 … |
|
Hi all, Is it possible to ignore temporary tables in mysqlbinlog file for replication. |
|
$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 … |
|
<?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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 * … |
|
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 … |
|
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 … |
|
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, … |
|
if ($count == 1){ $suc= move_uploaded_file($file_tmp, $destin.$file_name); echo"<br/>"; $query = mysqli_query($con,"INSERT INTO login ( profile_img) VALUES ('$file_name') WHERE useremail='".$_SESSION["sess_useremail"]."'") or die("can t still upload ".mysql_error());} |
|
|
I have the followiing data in my database(mysql) [img]http://i.imgur.com/jy3ryVk.png[/img] i want to represent then in a simple bar chart row after row with 2 sec interval(looks like dynamic).I am using jsp for my website.Code appreciated. |
below, I have created 4 tables using oracle sql. I want to change the code so that when deleting a student will delete all enrollments for that student. any idea how can I do this? # COURSES table # CREATE TABLE COURSES (COURSE VARCHAR(6), DESCRIPTION VARCHAR(60), CREDITS INT, CONSTRAINT pk … |
|
Hi, I want to create a SP in mySQL to insert records and return the Primary Key. But when I try and create the SP I get error: mysql said #1064, You have an error in your SQL Syntax, Check the manual that corresponds to your MySSQL server version for … |
|
I'm using pure php for the moment and I'm having a problem on what to do next using the command `DESCRIBE` calls all the header of my database but I cannot call those datas under the headers I have to manually put it. What I want to know is: * … |
|
I was designed a database model for my social network project. It has follower system. If you follow him the follower can see the status. All these operations are for one page. (This page is name **user_wall.php**) Its has a GET value and this is **userName**. For this case about … |
|
Hi, I have a problem with exercise 51 from sql-ex.ru, please help. Thanks in advance. # Short database description "Ships" # The database of naval ships that took part in World War II is under consideration. The database has the following relations: Classes(class, type, country, numGuns, bore, displacement) Ships(name, class, … |
|
|
This is the table that gives error -- ----------------------------------------------------- -- Table `mydb`.`Supervise1` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `mydb`.`Supervise1` ( `S1_Date` VARCHAR(45) NOT NULL, `S1_Contracter` VARCHAR(45) NOT NULL, `S1_Contractee` VARCHAR(45) NOT NULL, `S1_ID` VARCHAR(45) NOT NULL, PRIMARY KEY (`S1_Contracter`, `S1_Contractee`, `S1_Date`, `S1_ID`), INDEX `Contracter_idx` (`S1_Contracter` ASC), INDEX `Contractee_idx` (`S1_Contractee` … |
I am trying to save 2 photos to my MySQL database. I can only see one of the 2 photos in the database (i.e. its name) but I see the 2 photos in the folder I store my photos. ( A picture of how the database looks like is attached.) … |
|
I am trying to compare IF statements. if ($_POST['price'] =="see all"){ //show okolo } else if ($_POST["accommodation"] =="see all"){ //show chibuzo } This works but as soon as I add: else if ($_POST['price'] =="see all" AND $_POST['accommodation"]=="see all"){ //show henry } This stuff does not work, it now shows "okolo" … |
The End.