10,940 Topics
| |
hi i have a little problem, that i want to print the count of id, so i write this: $conn=mysqli_connect("localhost", "root", "","test") or die(mysqli_error()); $compt=mysqli_query($conn,"SELECT count(id) FROM `users`", MYSQLI_USE_RESULT); print $compt; to connect to db and extract the count id, i have an error and i dont know how to … | |
Im trying to convert mysql query to mysqli but it doesnt work...why? From: mysql_query("UPDATE views SET views=views+1 WHERE viewID='1'"); To: $q1=$mysqli->query("UPDATE views SET views=views+1 WHERE viewID='1'"); Errors: Notice: Undefined variable: mysqli in C:\wamp\www\SICS\home.php on line 5 Fatal error: Call to a member function query() on a non-object in C:\wamp\www\SICS\home.php on … | |
Hi All, I am developing a website in which i am selecting some values form database by a query When i am running query on PHPMyAdmin i am getting desired results but when i am using this query in actual PHP code, i am getting value of Last row. Can … | |
Gentlemen, I have a problem in entering a "DATE" in to MySQL table via a Java SWING interface. I used 'jdatepicker' to select a date & I use XAMPP server for MySQL database. Earlier I converted the selected date in to String values & feed as VARCHAR in mysql table. … | |
hello, how could i create a timestamp or time_of_posting column in my site such that there is no sync problem bw server time and visitor's time... also that column will be used for finding if diff bw time_of_posting and current time is >11months and less than 12 months | |
I have a form that has two parameters amenities and attributes. The amenities parameter has a dropdown menu that whose value gets populated from a separate table. The second parameter is attribute whose value will be entered by the user and will get saved in a database. View of database … | |
<?php require_once('Connections/localhost.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . … | |
hello,i have a column in my database named 'skills' where all the skills of a person are saved. if i want to find a person with multiple skills like he should be professional in cpppl,javapl,actionscriptpl,matlabpl i will do query like this select email from table where skills regexp 'javapl' and … | |
Here is the code. I am trying to hi-lite rows that are generated that have a value of "Y" for column AA_letter_recd in yellow, the rows . The ones that have a value of "N" are not to be high-lited in yellow. Thanks. <?php /*Main Store Index */ // Script … | |
this is my modal button this is within the table that why i use echo $rows['id'] <a data-id="<?php echo $rows['id']; ?>" type="button" class="btn btn-success btn-lg btn-block" data-toggle="modal" data-target="#myModal">View Order</a> this is my modal body <?php include('../conn.php'); $id=$_GET['id']; $list_query=mysql_query("select * from db where id='$id'"); $rows=mysql_fetch_array($list_query); ?> <form class="form-horizontal orderitem" role="form"> <div … | |
Hello, What variable types should I use for phone number. I tried to put integer(20) earlier then, I cannot record : 021888888 since it saves as 21888888 If I choose varchar(20) then it allows alphabets also, which it should. Any other ideas? | |
Hi guys, Trying to develop a custom facet like search in Mysql. I have 3 tables for this: 1.Attribute class 2.Attribute class Name 3.Attribute class Value - attributeClassName Id - productId 4.Products Each product has one attribute class Each attribute class has many values Each value is contained in a … | |
After Designing database--->Connection to database--->Data entered-->Data stored in database.My doubt is in which format data is viewed on the screen.(XML OR EXCEL OR PDF) | |
hello; i have taken shared hosting plan ..my sql query on phpmyadmin is SELECT 'EMAIL','first','last' UNION select email,first,last from e where skills regexp "javapl" and deposit>=bid INTO OUTFILE '/home/user/etc/csvfiles/1412231915.csv' FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' but it shows error #1045 - Access denied for user 'user'@'localhost' (using password: … | |
Hi All , i have my admin panel where i build a form which store information of model popup like its color , title etc and also fields is require to show in model popup. i means all features of model popup is generated by admin and saved to database … | |
Hi, I'm creating a game where users play daily & earn points. I wanted to record the scores of each user each day for a month. At first, I thought to create 31 columns within the table & store the score in the appropriate date field. But, I think it … | |
hello, i have a database in which three columns are there.name,datetime and timestamp...datetime and timestamp consist of the time people has put their entries into database.now i want to find out set of people older than 11 month.. i mean bw 11months to 12 months so that i can give … | |
Here is a php file that i HAVE...so at the moment it displays the latest news on the site but I want to add 5 more...how should my query be? <?php $stmt = $db->query('SELECT postID, postTitle, postURL, postDesc, postDate FROM posts where postid=(SELECT max(postID) from posts)'); while($row = $stmt->fetch()){ $output … | |
i would like to make a simple website but with shopping cart function, it should include payment method of Paypal, Visa, Mastercard, Alipay, etc most popular trasaction ways. the web show be as simple as possible, most like a wordpress, but the administrator funcation should be easy-going, and operate by … | |
Hi Everyone, Got a really strange problem with a mysql select query not displaying results in select dropdown. I have a small db table id,position,name and I am trying to display just the names where the position is GK Here is my query $result_dglass = mysql_query("select name from team where … | |
Hi guys, I really need some help here. I have been tasked to do a secure login system for the charities website. I have been looking on the web, and sure there are a multitude of examples out there. But my problem is the police, ambulance, NHS, etc are going … | |
Hello, I have write a simple search page for my sit(testing!) Now I am trying to highlight my search keyword from the search result. Not going to use java so I am thinking to use something like preg_replace But the problem is I dont where should I start with. As … | |
I am using PHPASS to store password encrypted and compare when login. here is the code ob_start(); $userName = $password = ""; $userNameErr = $passwordErr = $loginErr = ""; $hasher = new PasswordHash(8, false); if (isset($_POST['subEmployee'])) { if (empty($_POST['user_name'])) { $userNameErr = "User name is required"; } else { $userName … | |
I have this PHP code that creates a QR code with the given data: <?php include(JPATH_LIBRARIES . '/phpqrcode/qrlib.php'); $tempDir = JPATH_SITE . '/images/'; $codeContents = 'This Goes From File'; $fileName = 'qr_'.md5($codeContents).'.png'; $pngAbsoluteFilePath = $tempDir.$fileName; $urlRelativeFilePath = JUri::root() .'images/' . $fileName; if (!file_exists($pngAbsoluteFilePath)) { QRcode::png($codeContents, $pngAbsoluteFilePath); } else { echo … | |
I've been trying to start MySql in XAMPP and I keep getting "**ATTEMPTING TO START MY SQL SERVICE**" as a response. I tried replacing the port from **3306 to 3307**. I already unistalled my other MySql Program. **What should I do for MySql to work**? | |
I have created a function in mysql but when I call it using: SELECT myFunction(3); it says it does not exist. I checked my server and it is in there. I have also tried this also: INSERT INTO myTable(num, num2) VALUES (15, (SELECT myFunction(15))); Is this right and how do … | |
From two to three days MySQL56 does not strat when window starts. It still remain in stop position. I try to start it mannualy from its shortcut menu on its red coloured Icon at TaskBar. But it still remain in stop position. Through Control Panel I went to the Servises … |
The End.