10,940 Topics

Member Avatar for
Member Avatar for devianleong

function returnnotify(){ $result = mysql_query("SELECT * FROM rentcustomer WHERE Expiredtime = CURDATE()"); $count = mysql_num_rows($result); if ($count >= 1){ echo $count; }else{ echo "0"; } } now when I run the code above ,it will prompt out this error: Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in …

Member Avatar for pritaeas
0
251
Member Avatar for canniemar

Hi can someone tell me how to create an sql statement in which I can include multiple conditions? e.g. I want to select all from a particular table in which I can enter different keywords that would produce different results such as all items by a particular brand e.g. microsoft …

Member Avatar for Q8iEnG
0
93
Member Avatar for dirkleonschut

Hello People. I would like to ask you're assistance with a little problem I am having. When I execute this code: string sql2 = "INSERT INTO worlds (worlds_ID,worlds_active,worlds_name,worlds_x,worlds_y) VALUES ('', '1', 'Test', '250', '250');"; MySqlCommand cmd = new MySqlCommand(sql2, OpenCon()); addtolog("server", "World Created"); it does not make the new row …

Member Avatar for dirkleonschut
0
191
Member Avatar for Riu 2009

<?php $title=$_POST["title"]; $theme=$_POST["theme"]; $con=mysql_connect($dbserver,$dbusername,$dbpassword); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db($dbname, $con); $query=mysql_query("SELECT * FROM setup WHERE id=".$_SESSION['id']); $result = mysql_query($query); $num_rows = mysql_num_rows($result); if ($num_rows > 0) { while($row = mysql_fetch_array($result)) { $_SESSION['id'] = $row['id']; $_SESSION['title']=$title['title']; $_SESSION['theme']=$theme['theme']; } { mysql_query("UPDATE setup SET title='".$title."' , theme='".$theme."'WHERE …

Member Avatar for Riu 2009
0
1K
Member Avatar for thecameraman

Hello, I want to display the fields that were updated. When a user edits their information, example; "FIRST NAME:John LAST NAME: Stih Update to:UPDATE users SET firstname = '$firstname', lastname = '$lastname' FIRST NAME: John LAST NAME: Smith I would want it to print "You updated your Last name"

Member Avatar for pritaeas
0
167
Member Avatar for xbat

I on my drop down boxes it keeps on selecting more than one option I just want it to select out of one row... for some reason this won't work nothing shows - $query["cost1"] = "SELECT ourprice as text, ourprice as value FROM `fruitinventory` WHERE seeddescription='%s' AND fruitdescription='%s'"; Something shows …

Member Avatar for xbat
0
196
Member Avatar for system_Broken

I WANT SEND ITEMS INTO DATABASE WITH ONE TIME CONNECTION OPEN ? MYCONN.OPEN(); FOR(INT I =0; I < CODE.COUNT ; I ++) { DB.SUBMITITEMS(CODE[I]); //IS IT RIGHT IF I HAVE 100 ITEMS TO SEND DATABASE WITH ONCE TIME OPEN CONNECTION OF DATABASE; OR I NEED TO REOPEN AND CLOSE CONN …

Member Avatar for M.Waqas Aslam
0
144
Member Avatar for 47pirates

In my desktop application whenever execute the code to backup my database from java application the app goes on waiting state may be for password , which we have to enter while backing up from command line. But i've provided the username and password of database in the code. Why …

Member Avatar for rajesh1158
0
3K
Member Avatar for HasNor

Dear experties, I want to display data from Mysql by keyword but my code doesn't work. Maybe you have suggestion for this environment. please...

Member Avatar for ryantroop
0
169
Member Avatar for gordey wilson

1 down vote favorite You can't vote for your own post. (click on this box to dismiss) I have a very big problem with my website. I have a form, more like a text box used in submitting comments, that not the problem. The problem is displaying the comments. I …

Member Avatar for Taywin
0
128
Member Avatar for MashaM

trying to develop a system to assign grades to students. The system reads marks from my database, and assigns a grade after getting average of scores. Used case statements, keep throwing errors. So i tried if statements but its giving me issues. Someone know a better way to do it? …

Member Avatar for Taywin
0
123
Member Avatar for xbat

I have a bunch of drop down boxes, then after they are selected the the total amount automatically appears at the bottom.. the only problem is it appeears like this - <span id="resp">Total</span> How would I make this insert into the database?

Member Avatar for xbat
0
2K
Member Avatar for Ctechnology24

Help, I need a free hosting site! I have a website made of PHP that I need to upload to a web server and a VB.net application on my PC, I saw tutorials on how to connect my VB.net application to my database located in the web server with my …

Member Avatar for chrishea
0
192
Member Avatar for <M/>

I have a GoDaddy account and I want to connect dreamweaver to the mysql server... but I keep getting errors... no matter what I do... can someone assist me? I called GoDaddy, they couldn't answer me so they blamed Dreamweaver...

Member Avatar for <M/>
0
305
Member Avatar for dre-logics

>I use MySQL database Two tables: Table 1 articles Field: article nb article description supplier cell 100 nails company 1 no 200 screws company 2 yes >Table 1 stock Field: article nb. barcode nb. barcodedescription instock 100 10011 nails 2 inch 5000 100 10012 nails 5 inch 0 200 20012 …

Member Avatar for dre-logics
0
277
Member Avatar for spacehans

Hello, I am trying to display various types of search results on a seperate page: Here is my PHP CODE for the form: --------------------------------------------------------------------------------------------------------------- <table width="75%" cellspacing="10" cellpadding="10"> <tr> <td width="22%" class="subtiwhite"><strong>Search by Name:</strong></td> <td width="74%"><form name="form1" method="get" action="searchname.php"> <input type="text" name="namelist" id="namelist"> <input type="submit" name="searchname" id="searchname" value="Submit"> </form></td> <td …

Member Avatar for hericles
0
318
Member Avatar for HometownHero

I can't seem to display the image.. Here is my code.. <?php $user='root'; $server='localhost'; $db='db_gamecube';//database name mysql_connect('localhost','root'); mysql_select_db($db); $pass=$_POST['password']; $uname=$_POST['uname']; $sql="select * from tb_register where username ='$uname' and password='$pass'"; $result= mysql_query ($sql) or die (mysql_error()); if(mysql_num_rows($result)==1) { session_start(); $_SESSION['guest']=$uname; echo "<form method ='post' action='login_edit.php'>"; $records=mysql_fetch_assoc($result); echo "<table border =10> <tr> …

Member Avatar for HometownHero
0
203
Member Avatar for ashiiiish

Hi all I want to install mysql in my redhat 5. I have downloaded an rpm but its saying that MYSQL-DEVEL not found. Kindly provide me the link of all those that I need to install.

Member Avatar for sepp2k
0
168
Member Avatar for CarterLangley

Hi again guys, I am getting information from a table that I would dearly love to format using my css styles in an external css sheet. Now I am calling the sheet in the header correctly, tested that to make sure. Here is the code I am using. This generates …

Member Avatar for CarterLangley
0
412
Member Avatar for gk1993

$u = mysql_real_escape_string($_POST["username"]); $p = sha1($_POST["passwd"]); $q = "SELECT * FROM profile WHERE email=`$u` AND passwd=`$p`"; $run = mysql_query($q); if(!$run){ echo mysql_error(); } this creates *Unknown column 'mymail@gmail.com' in 'where clause'* error. This code is from a tutorial and a piece of a submit-new-post php page.

Member Avatar for gk1993
0
159
Member Avatar for winnzor

So i have this table: numb_1 | numb_2 | numb_3 ------------------------ 5 | 5 | 5 1 | 5 | 5 2 | 2 | 3 5 | 3 | 6 5 | 4 | 7 how do i find the most common value in the 3 fields? so for …

Member Avatar for winnzor
0
258
Member Avatar for PBDeveloper

I am trying to add the information below into a Wordpress database table (specifically the wp_postmeta table). But I can't figure out how to add the ones with the same node name. The XML document is: <?xml version="1.0" encoding="UTF-8" ?> <rss version="2.0" xmlns:excerpt="http://wordpress.org/export/1.1/excerpt/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wp="http://wordpress.org/export/1.1/" > <channel> <title>Title</title> …

Member Avatar for pritaeas
0
220
Member Avatar for Stardemos

Hello. I'm new to php and sql. I nee to insert data in multiple tables and rows. the problem, in the first table, I just nedd 1 row, and that's fine, in the scond i need to input data in the minimum of 1 row and max of 6 row's. …

Member Avatar for Stardemos
0
790
Member Avatar for rjony321

Hi, I have login logout problem.when i LOGED IN i want my login button change it logout.But its not beahave like this.here is my code please see and help with neccessary steps: <?php if(isset($_SESSION['user_active_status'])=='1') { ?> <div class="user_purpose"> <ul> <a href="index.php?page_select=page_logout124" style=" font-family: calibri; color: white;"><li class="user_log">Logout</li></a> // page_select : …

Member Avatar for Squidge
0
97
Member Avatar for anujthefuhrer

how date is implemented as a datatype in database in mysql(or in any other database): its representation and operations

Member Avatar for pritaeas
0
41
Member Avatar for da(code)da

i have a list and mysql table. my goal is to make the links active if there is a game in its section: this is my code: mysql_select_db("my_db", $con); $result = mysql_query("SELECT * FROM gameChart"); $row = mysql_fetch_array($result); echo "<dl><dt>Writer's Forge</dt>"; if (!$row["secID"] == 1){ echo "<dd>Collaborated Poetry</dd>";} else { …

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

Im getting a "Unknown database 'user_admin'" error and i dont see it here is my code $username = mysql_real_escape_string($_POST["Username"]); $query = "SELECT * FROM user WHERE UserName='$username'"; $result = mysql_query($query); if(mysql_affected_rows() == 0) { //All Checks Out: Create Databases $dbase = "user_" . $_POST["Username"]; mysql_query("CREATE DATABASE $dbase",$con) or die(mysql_error()); mysql_select_db($dbase, …

Member Avatar for nunomartinsinet
0
186
Member Avatar for asaidi

Hi > nice to be in DANIWEB > really i m stucked in collecting value from ajax > i have an html select option on onchange on account i have the list of the customers belongs to the account > the problem i cannot collect the value of customer choosen …

Member Avatar for pritaeas
0
94
Member Avatar for arctushar

Hi I have a form with textarea. when user submit content through this text area. indent and paragraph is preserving in mysql. Even when I copy data from mysql via phpmyadmin, it also preserving indent and paragraph. But problem is that, when I get data from mysql via php script. …

Member Avatar for pritaeas
0
71
Member Avatar for Ebiso

I am trying to create a search form for my database where a user can search for a customer name and all of that customers addresses will be displayed. my structure looks like this Customer table + ID + First Name - Last name - Company Name Address Table + …

Member Avatar for smantscheff
0
360

The End.