10,940 Topics

Member Avatar for
Member Avatar for johnef_sh

Hey, I'm running a mysqli query, and would like to run a script if the query returns no results. this is my code <?php $SM_pro_info="SELECT * FROM special_marketing_ads ORDER BY id desc LIMIT 4"; $QSM_pro_info = $db->query($SM_pro_info)or die($db->error); $SM_pro=mysqli_fetch_array($QSM_pro_info); if($SM_pro){ while($SM_pro=$QSM_pro_info->fetch_object()){ ?> <table width="208" border="0"> <tr> <td width="129" height="35" align="right"><span …

Member Avatar for phorce
0
574
Member Avatar for Synestic

Hi What would be the best practice to format my text in MySQL without messing around in php? For example, I have a description: TECHNICAL FEATURES: Anti static, dust repellent,... COLOURS AVAILABLE: - WHITE - BLACK I'm copying everything from my old website (html-only) into my database, and this is …

Member Avatar for blocblue
0
94
Member Avatar for pritaeas

Below is a documented code example showing how to use the [MySQLi](http://php.net/manual/en/book.mysqli.php) (MySQL improved) classes/objects to connect and query your database (and check for errors). If there are any questions, or you want to see different features, let me know.

5
4K
Member Avatar for pritaeas

Below is a documented code example showing how to use the [MySQL functions](http://php.net/manual/en/book.mysql.php) to connect and query your database (and check for errors). Please note that using the MySQL extension is **NOT RECOMMENDED**. This extension is no longer maintained and will be deprecated soon. If you want your scripts to …

3
860
Member Avatar for HunainHafeez

i have a table in Mysql's database, tblStudents, which has 1,000 stdents, from different departments, e.g 500 from IIT, 300 from IMS, 100 from Medical, 100 from Engineering. and on fornt end in, i have 2 dropdown boxes, one drpdwnDown box is filled with values, IMS, IIT, MEDICAL, ENGINEERING. now …

Member Avatar for slyme
0
208
Member Avatar for sammry

i have 2 tables as follow sales (table1) sales_id, userid(buyerid), product id, productname, orderid, status users (table2) userid, username, pass Now, I need to display the top customer who makes regular purchase on my shopping site. How can I achieve this? I tried as SELECT A.(*), B.username FROM sales A, …

Member Avatar for sammry
0
128
Member Avatar for eburlea

Good day, I've created a webpage on localhost using php. I have a local network with 3 computers at home. I can access the webpage only from one computer (http://localhost/mywebpage/). What changes should I make in phpmyadmin to be able to access the webpage from all computers? Is it possible? …

Member Avatar for AndreRet
0
634
Member Avatar for Dani

DaniWeb will once again be sponsoring the Percona Live MySQL conference coming up next month. You can go to http://www.percona.com/live/nyc-2012/ to register and use promo code DANIWEB to save 15% on tickets. DaniWeb will also be hosting the official after party for the Percona conference, which you can find out …

1
45
Member Avatar for David2012

Hi Everyone! My question is on Pagination (as it is called). I have a php program that accesses a database and shows the result list with HTML. Well, if my result list is quite long how do i code so that only say 10 rows show per page. I know …

Member Avatar for urtrivedi
0
361
Member Avatar for Shodow

i am making a booking system and i am thinking how am i suppose to know if there is a conflicting time.. i want to add an Error message if the time is conflicting in other event help me please Example: Date Time Start Time End DEBUT September 18 5:00 …

Member Avatar for G_Waddell
0
220
Member Avatar for heshanm

Hi All, I want to generate time table reports. A form includes labels to enter grade, class and stream. After selecting data user should click on "Generate" button and relevant time table details. The data is submitted for the following page and there was an empty set of data shown …

Member Avatar for smantscheff
0
222
Member Avatar for kkasp

I am creating the Simple Blog from PHP for absolute beginners book. I have worked through the book and my only error now occurs when I am logged in as the admin and try to Post a Blog. The errors I get are: Warning: array_push() expects parameter 1 to be …

Member Avatar for safety1g
0
394
Member Avatar for matiqueen

Hi guys, i'm new here. First of all, i'm from Argentina... So maybe my english is a little crappy I'm developing a page with login. I uploaded it to a hosting with no poblem... But when i want to create a stored procedure an error appearse. I've searched on web …

Member Avatar for smantscheff
0
194
Member Avatar for fritafana

I just want to connect my mysql with vb.net code as below: But,for some reason I cant figure out the problem i have also added the mysqldata.dll in my reference. all the input in connection string is valid and there is no error in the code. it just shows cannot …

Member Avatar for artemix22
0
189
Member Avatar for Moderns

Dear Respected Members, I have problem with LEFT JOIN that it brings the whole columns from tables even if I limit to specific column ids :( I am forced to use the LEFT JOIN because in table B - column "id" - is not always exists in table A. Please …

Member Avatar for rch1231
0
159
Member Avatar for nathanpacker

Hey, I've got a simple little table that has only 3 fields. ID (primary key, auto-increment), cat_name, and cat_num. I need to know how to get my php script to go into that table, and increase the value in cat_num by one on every row. So for instance, here is …

Member Avatar for tgmsocal
0
3K
Member Avatar for annquin

Hi. does anyone know how to save the combobox selected Index like(0,1,2,3) in mysql database by combobox as INTEGER? Please help me..!

Member Avatar for annquin
0
112
Member Avatar for HunainHafeez

i created database in mysql along with 3 tables but when i opened C:\ProgramData\MySQL\MySQL Server 5.5\data then i found on .frm files and a single .opt file so where is my originalo datbase and data ? my datbase name is kustkht

Member Avatar for HunainHafeez
0
187
Member Avatar for Dan_iweb

Hi, I have this script, it attempts to place JSON data into a MySQL database. The problem is it duplicates records, this does not happen when the “news_added” field is not NULL. That’s the only thing I can see different. I would like the script to update a record, replacing …

Member Avatar for Dan_iweb
0
132
Member Avatar for eulo

hi all. I have some problem. I want to make Delete multiple rows in mysql with check box. so I did it below. but delete doesn't work. could you tell me where is wrong ? <?php include'conn.php'; mysql_select_db("auction")or die("cannot select DB"); $sql="SELECT * FROM family"; $result=mysql_query($sql); $count=mysql_num_rows($result); ?> <table width="400" …

Member Avatar for simplypixie
0
228
Member Avatar for lizetta

Hey guys I have a mysql database that has an events table. The events table consists of the fields Title, Date, Place and description. I am trying to display the table on the browser using php coding. it should list important events first according to the date. so as follows …

Member Avatar for simplypixie
0
255
Member Avatar for HunainHafeez

i have tblStudents and tblDepartments, so which keys a weak entity (student_department) would have ? studentid and departmentid ? is it so ? and both foreign keys will work as a composite primary keys ? is it ?

Member Avatar for HunainHafeez
0
127
Member Avatar for HunainHafeez
Member Avatar for HunainHafeez
0
100
Member Avatar for jayrbete

hi to all, can you help me in my program, i can't retrieve my image in the database to vb.net how can i view my image when i click in listview? plss help me THIS IS MY CODE HOPE YOU CAN HELP ME! Imports MySql.Data.MySqlClient Public Class Often_Motorcycle_Problems Public ConnString …

Member Avatar for jayrbete
0
794
Member Avatar for jayrbete

Please help me for my problem in adding and retrieving video from mysql to vb 2008. I don't know the codes for it.

0
136
Member Avatar for anitg

I have no issues with the query in the below code. But the second code is throwing the error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 Working code …

Member Avatar for broj1
0
199
Member Avatar for Hypalink

Hi guys, I´m attempting to write a simple "get quote" script, but need some advice about best practice. I want to structure it as follows, lets say a customer wants 1,2,3,4 or 5 apples - I want the quote to be $1. If the customer wants 6,7,8,9 or 10 apples …

Member Avatar for Hypalink
0
186
Member Avatar for gilgil2

Hi I have the following code being used to insert some data into a MySql database, all the error checks etc. are done before and those are fine, and the code returns connected successfully but nothing is put into the database, nor does the database check for duplicate usernames, because …

Member Avatar for iamthwee
0
2K
Member Avatar for garyjohnson

I have created two database tables, One which holds all of the users information, and another which holds the name of the videos they uploaded and who uploaded it. How do I get information from both tables?

Member Avatar for garyjohnson
0
199
Member Avatar for anitg

I have no issues with the query in the below code. But the second code is throwing the error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 Working code …

Member Avatar for smantscheff
0
291

The End.