Jump to content

Modify "SELECT * FROM


datoshway

Recommended Posts

I need to modify this code i'm working with so im pulling a certain row and not the whole table.  Can anyone help?

 

<?php

define("STR_RELATIVE_PATH", "");

require STR_RELATIVE_PATH . "_includes/_database.php";

db_connect();
db_select();

$strQuery				= "SELECT * FROM tblServices ORDER BY intID ASC";
$queryGetServices		= db_query($strQuery);

?>

Link to comment
https://forums.phpfreaks.com/topic/197037-modify-select-from/
Share on other sites

<?php



define("STR_RELATIVE_PATH", "");






require STR_RELATIVE_PATH . "_includes/_database.php";



db_connect();



db_select();



$strQuery








//Rename column to the column you are searching, and the value is self explanatory.
= "SELECT * FROM `tblServices` WHERE `column` = 'value'"; //You don't need an ORDER BY if you are only pulling one row.



$queryGetServices





= db_query($strQuery);




?>

Link to comment
https://forums.phpfreaks.com/topic/197037-modify-select-from/#findComment-1034369
Share on other sites

 

You rock man, thank you for the help, worked perfectly!

 

<?php



define("STR_RELATIVE_PATH", "");






require STR_RELATIVE_PATH . "_includes/_database.php";



db_connect();



db_select();



$strQuery








//Rename column to the column you are searching, and the value is self explanatory.
= "SELECT * FROM `tblServices` WHERE `column` = 'value'"; //You don't need an ORDER BY if you are only pulling one row.



$queryGetServices





= db_query($strQuery);




?>

Link to comment
https://forums.phpfreaks.com/topic/197037-modify-select-from/#findComment-1034371
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.