10,940 Topics

Member Avatar for
Member Avatar for Amine_3

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 …

Member Avatar for gabrielcastillo
0
152
Member Avatar for RonKevinT.Manuela

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 …

Member Avatar for gabrielcastillo
0
370
Member Avatar for zeeshan009

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 …

Member Avatar for gabrielcastillo
0
223
Member Avatar for gajen007

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

0
105
Member Avatar for ankit1122

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

Member Avatar for ankit1122
0
77
Member Avatar for learner001

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 …

Member Avatar for pritaeas
0
224
Member Avatar for jimmyruan1

<?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 != "") ? "'" . …

Member Avatar for pritaeas
0
847
Member Avatar for Santanu.Das
Member Avatar for ankit1122

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 …

Member Avatar for ankit1122
0
104
Member Avatar for codephp

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 …

Member Avatar for codephp
0
286
Member Avatar for Shodow

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 …

Member Avatar for mattster
0
5K
Member Avatar for Santanu.Das

I am new in MySQL. I do not about model and how can I store data in the tables created in amodel.

Member Avatar for Santanu.Das
0
124
Member Avatar for davy_yg

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?

Member Avatar for Santanu.Das
0
102
Member Avatar for Santanu.Das
Member Avatar for cereal
0
119
Member Avatar for Szabi Zsoldos

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 …

Member Avatar for Szabi Zsoldos
0
205
Member Avatar for Chem_1

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)

Member Avatar for Chem_1
0
160
Member Avatar for ankit1122

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

Member Avatar for jackstone444
0
361
Member Avatar for mangel.murti

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 …

Member Avatar for gabrielcastillo
0
108
Member Avatar for v1shwa

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 …

Member Avatar for v1shwa
0
207
Member Avatar for ankit1122

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 …

Member Avatar for cereal
0
129
Member Avatar for RonKevinT.Manuela

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 …

Member Avatar for RonKevinT.Manuela
0
195
Member Avatar for cmabill

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 …

Member Avatar for hericles
0
138
Member Avatar for lloyd.farrell.7

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 …

Member Avatar for nobita2811
0
215
Member Avatar for CarterLangley

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 …

Member Avatar for MikeJones_1
0
232
Member Avatar for yy886

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 …

Member Avatar for MikeJones_1
0
2K
Member Avatar for johnef_sh

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 …

Member Avatar for diafol
0
244
Member Avatar for acrocephalus

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 …

Member Avatar for almostbob
0
2K
Member Avatar for Phermae

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

Member Avatar for hericles
0
47
Member Avatar for Transcendent

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 …

Member Avatar for jstfsklh211
0
209
Member Avatar for Santanu Das

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 …

Member Avatar for AleMonteiro
0
101

The End.