7,368 Topics

Member Avatar for
Member Avatar for Shizuo

How do I change all greater than .00 cents to .49 cents be .00 and all greater than .50 to be round off? I'm using SqlYog btw. Example: price 1: 16:03 price 2: 16:53 Output: price 1: 16:00 price 2: 17:00

Member Avatar for Shizuo
0
102
Member Avatar for Djmann1013

Hi I am having trouble with this code: <? $host="mysql6.000webhost.com"; // Host name $username="removed"; // Mysql username $password="removed"; // Mysql password $db_name="removed"; // Database name $tbl_name="direct"; // Table name // Connect to server and select database. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("Error. MySQL Not Responding."); $SQL = "SELECT * …

Member Avatar for Djmann1013
0
194
Member Avatar for Ancient Dragon

Every once in awhile I get email from my web site vBulletin that there is an error on MySQL. Below is the most recent error message. Looks like it might be caused by a hacker to me, what do you think? I've asked the technicians at iPage and they have …

Member Avatar for al c
0
316
Member Avatar for scaiferw

I'm new to triggers, but have been working with MySQL for quite a while. Now I need to implement a trigger. I want to create a trigger on my 'persons' table so that after an update, ***if the attribute clubid is changed***, attribute clubname should be changed. I have a …

Member Avatar for scaiferw
0
233
Member Avatar for kaysarchw

Hi there, I have a form with some fields. Address is one of them. I used textarea tag for address. Now the problem is, when i search something according to one address, it only works for the one line addresses. I mean if i entered a newline (Paragraph format) in …

Member Avatar for pritaeas
0
204
Member Avatar for MarielaMontaldo

Hey, I've been trying to generate a pdf file using html2pdf library (http://html2pdf.fr/en/example). What I need to do is to print a table with PHP in that pdf file, so I stored the table in a variable called $contain with all html tags. My code goes this way: 1) It …

Member Avatar for chrishea
0
876
Member Avatar for da(code)da

My Table create is giving me problems. i probably missed something small but i cant find it. $dbase = $_COOKIE['ID'] . "char"; // Create table mysql_select_db($dbase, $con); $sql = "CREATE TABLE games ( gameID int NOT NULL AUTO_INCREMENT, PRIMARY KEY(gameID), gameName varchar(25), intro TEXT, bground TEXT, cast ENUM( '0', '0', …

Member Avatar for phorce
0
109
Member Avatar for da(code)da

Ok I have a promblem. Im getting a unidentified variable error from **$found:** Whats wrong here? while($row = mysql_fetch_array($result)) { **$found** = true; echo "Character/Alias: " . $row["CharName"] . "<br>Created: " . $row["CharBorn"] . "<br>Game: "; if ($row["CharGame"] == '0') { echo "None"; } else { echo "In-Game"; } } …

Member Avatar for da(code)da
0
120
Member Avatar for da(code)da

here my username is know as callsign there is a problem somewhere that i cant find and i present the code: $callsign = mysql_real_escape_string($_POST["CallSign"]); $result = mysql_query("SELECT * FROM users WHERE CallSign = '$callsign'"); $row = mysql_fetch_array($result); echo $row['CallSign'] . "<br>"; $sql = "SELECT COUNT(*) FROM users WHERE CallSign = …

Member Avatar for phorce
0
167
Member Avatar for da(code)da

my code is messing up. help: if (mysql_query("CREATE DATABASE $dbname",$con)) { echo "Database Created<br>"; $dbase = $_POST["CallSign"]."char"; mysql_select_db($dbase, $con); $sql = "SELECT * FROM $dbase"; $result = mysql_query($sql); if ($result) { echo "CallSign Accepted<br>"; mysql_select_db("my_db", $con); $sql="INSERT INTO users ( CallSign, Email, FirstName, MiddleName, LastName, Gender, BirthMonth, BirthDay, BirthYear, Location, …

Member Avatar for da(code)da
0
183
Member Avatar for aianne

Hello everyone! :) Could you please help me? I am still a noob and I'm having a hard time about displaying selected values from mysql database into popup window? This is my code where user can see the table of the electoral officials: -----CUT----- <div id="page"> <div id="blanket" style="display:none;"></div> <div …

Member Avatar for diafol
0
4K
Member Avatar for da(code)da

So im trying to make a password login and im getting errors. i got past my Unable to jump to row 0 error with this: **mysql_num_rows($result) >= 1** but now it wont jump to the row when the password is correct ether :/ here is the code; whats wrong with …

Member Avatar for da(code)da
0
264
Member Avatar for rjony321

Hello,I cant access my two table date together in one search option.like table name: name_search & skill_search.here is the code.please check it and if possible solve it. <?php $connect=mysql_connect('localhost','root',''); $mysql_db=mysql_select_db('my_database',$connect) or die(mysql_error()); if (isset($_POST['search_name']) && isset($_POST['search_skill'])) { $search_name= $_POST['search_name']; $search_skill= $_POST['search_skill']; if(!empty($search_name) && !empty($search_skill)){ if(strlen($search_name,$search_skill)>=4){ $query = "SELECT name FROM …

Member Avatar for diafol
0
116
Member Avatar for raminr63

Hi guys i first thank you for helps. and i have a script i use that for application authentication In fact the users must use your user name and password to use that App then after authentication of they user and pass passed they allow to use that application. and …

Member Avatar for pritaeas
0
294
Member Avatar for goody11

Hey evryone. For some reason, I can't seem to insert anything into this table that I have in a database It connects just fine and the variables that I'm retrieving are just fine, which leads me to believe that my INSERT statement is incorrect. Any ideas? Here's the code: function …

Member Avatar for goody11
0
241
Member Avatar for mehidy

I am getting data from my order table in a html form, with its id under checkbox, now i want to select some id by checkbox & want to get the total quantity from the mysql table in a new html form/page. I hope, i am able to make u …

Member Avatar for dpste
0
564
Member Avatar for da(code)da

Im not seeing it but its not working here is the code: mysql_select_db("my_db", $con); $sql = "CREATE TABLE stream ( waveID int NOT NULL AUTO_INCREMENT, PRIMARY KEY(gameID), userID int, wave varchar(25), waveTime TIMESTAMP DEFAULT NOW() )"; // Execute query if(!mysql_query($sql)) { echo "Couldn't do it"; } else { echo "alright"; …

Member Avatar for da(code)da
0
170
Member Avatar for iamnot

I am using mysql to fetch this result from the database.I need to caluclate the rank of a prticular user id from this result.What is the easy and smart way of doing it? SELECT a.UserId,d.AreaId,d.SubjectId, SUM( a.Marks ) AS sum, COUNT( a.Marks ) AS count, SUM( a.Marks ) / COUNT( …

Member Avatar for diafol
0
176
Member Avatar for sri.

i have a lot of mysql data (2 Lakhs data) how to collect data with in a seconds ? any idea thanks in advance

Member Avatar for diafol
0
269
Member Avatar for malockwood

Hi every one I have a very simple form and it just will not submit to the db. Could some one please tell me where I am going wrong? <?php if ( $_SESSION['logged_in'] ): ?> (1) <?php endif; ?> <?php if($_POST['formSubmit'] == "Submit") { $errorMessage = ""; if(empty($_POST['social_media'])) { $errorMessage …

Member Avatar for malockwood
0
191
Member Avatar for rjony321

Hi, please first you visit this site http://www.webdo.x10.mx/ this is my practice site.I just starting my php carrer.here i create a search option with button but its not working as my expectation.i think its code is OK".here the code.. <?php $connect=mysql_connect('localhost','root',''); $mysql_db=mysql_select_db('my_database',$connect) or die(mysql_error()); //db name:my_database if (isset($_POST['search_name'])) { $search_name= …

Member Avatar for rjony321
0
371
Member Avatar for rjony321

Hi, This is my first post.I just starting php Hope everyone reply me as possible as. I have signup problem.When i filled the form and click sign up button then it nothing show any result i mean its not home.php "welcome" message and also not store date in my mysql …

Member Avatar for rjony321
0
189
Member Avatar for newbie14

We are running a C program where for every one second there is a function callback. Below is the snippet of the code listed. It is ran over every second without missing so we notice sometimes when is busy doing the insert part and the next select is up and …

Member Avatar for newbie14
0
241
Member Avatar for JackPaddyWack

Here are my two pages I am using to edit. One is the HTML form and the next is the code to insert the changes. I have looked overthis code for a few hours and have not seen anything wrong. I hope it is not something super simple or I …

Member Avatar for JackPaddyWack
0
140
Member Avatar for iamnot

I need to store both text and images to be stored in the same field? How can this be implemented in php using a mysql database? I have used BLOB to store images in the past . Which datatype should I use for this problem? And how will this work...? …

Member Avatar for smantscheff
0
188
Member Avatar for reggie.dipo

Hi, I'm new to php and i'm trying to build simple database and I having a problem with getting id value with $_GET here is snippet of my code: $id = (int)$_GET['id']; echo $id; if(isset($_POST['upd'])){ $sql = "UPDATE dvds SET title = ?, folder = ?, spot = ? WHERE …

Member Avatar for broj1
0
106
Member Avatar for jpknoob

Hello all, I have a drop down that is populated using php and mysql. when the user makes a selection, I run the function showUser(), however, nothing happens when i make a selection, can anyone help with what I'm doing wrong? The JS [CODE] <script type="text/javascript"> function showUser(str) { if …

Member Avatar for cscheck
0
357
Member Avatar for kn3rdmeister

I want to have a list of months and years when content was posted to my website. Example: /// **Archive** *July 2012 June 2012 May 2012 April 2012* /// Then, clicking one of list items takes you to a page with every post from that month. I know I should …

Member Avatar for pritaeas
0
661
Member Avatar for code739

hi all, i just want to ask if its possible to have a two or even more database connection in a php run application like db_connect---db1 fetch data db_connect--db2 fetch data db_close --db2 if its not possible. how can i get data from other database table appriciate youre answers.

Member Avatar for diafol
0
116
Member Avatar for johnnycho

My question requires a little background first: I'm working on a Web project where there are four theatres owned by a single company, so not only will the four theatres each need their own Website (each with its own unique branding), but the umbrella company will need one as well. …

Member Avatar for knssanthan
0
236

The End.